Collections, Objects and Lists

When programming using VBA you manipulate objects that represent different aspects of an application as defined by its object model. A schematic diagram of the entire Multiframe object model is displayed in the diagram on the next page.  It divides the Multiframe application and the structural model into many distinct objects. These objects may represent a single component of a model such a node, element or a load case. Other objects within the model do not represent a physical part of the model but are used to store settings or data such as the settings for a modal analysis or the results from an analysis for a particular node.

 

Each Object contains Properties and Methods. The Properties are a number of variables which store properties of the object such as name, length, weight etc. The actual type and name of the properties are specific to each type of object. Methods are functions that you can use to manipulate the object. These might include methods to Add, Delete or modify values of the object.

 

A special type of object is a collection which is a container storing an ordered set of objects of the same type. For example, the Elements collection in the Frame object contains all of the Elements in the frame. Collections within the Multiframe object model are named as the plural of the objects they contain. Most collections in Multiframe are initially empty. The exception is the LoadCases collection that initially contains a single object. All of the collections in Multiframe are 1-based i.e. the first item in the list has an index of 1.  Some care must be taken when programming in VBA as it can use zero based collections and arrays in which the first item in the list has an index of zero.