CATIA utilizes object oriented programming, which came about due to the need to represent more complex ideas within a program. For example, you could say that a person is described by his height, weight, and hair color, and that every person has certain actions that they can perform, such as walking, eating, and sleeping. These “properties” and “methods” make up the “class” called “Person.” Objects of this class can then be used in a program to represent individual people. Objects have properties that can be read or set as well as methods which modify their behavior.catia vba structure

Object – An entity (in CATIA or VB). Points, Pads, Parameters, etc. are all examples of CATIA objects. Objects use aggregation to denote a “consists of” relationship between objects. If object A consists of B and C this means object A aggregates B and C.

Property – Properties are characteristics of an object, like the object’s name. Properties define the state of the Object during a specific moment. For example, the name of a PartDocument is a property of that object and is assessed by adding a period “.” after the object’s variable name, such as oPartDoc.Name.

Method – An action that an object can perform. Verbs are typically used for the names of Methods. For example,oPartDoc.Save is an action that the object can perform.

Collection – A group or list of similar objects which are put together for a specific reason. Collections are objects that aggregate an array of other objects.

Class – Class defines the type of Object. Inheritance is used to create hierarchies between classes and sub-classes.

Inheritance: Document, PartDocument, and ProductDocument are all classes but only PartDocument and ProductDocument are classes that inherit properties and methods from the Document class. This means they have all properties and methods in common which they inherit from the Document class but they also have their own properties and methods unique to themselves.

Thanks for reading about CATIA VBA structure. Read another CATScript tutorial.