

Indentation: Indent or out dent script to reflect the logical structure and nesting of the statements to make it easier to read. It is recommended that you add comments wherever possible to make your scripts easier to understand and maintain, especially if another user has to make changes to it later on down the road.

Listed below are some of the key syntax features of CATIA macro programming: The bottom pane shows the correct syntax.Ĭase Sensitivity: By default, VBA is not case sensitive and does not differentiate between upper-case and lower-case spelling of words.Ĭomments: Add comments to your statements using an apostrophe (‘), either at the beginning of a separate line, or at the end of a statement. Syntax enables the programming language to understand what it is you are trying to do. Why is this? An email address has a correct structure in the language of the internet, its syntax. Think of it like this: when you see an email address you immediately identify it as an email address. Learning the syntax of each programming language is crucial to creating successful macros. Each scripting language is composed of its own syntax. You can think of it as a particular layout of words and symbols. Now, any configuration can be selected and a new variant of tumbler can be obtained.CATIA macro syntax is defined as the ordering of and relationship between the words and other structural elements in phrases and sentences. Now, open the design table and add all the input values of parameters and save it.ĭesign Table is added under Relations node design in the specification tree. In this case, a Design Table can have input values for a greater number of parameters with only one driving parameter.ĭesign Table can be created either using any pre-existing design file or with current parameter values.ĭesign table is saved. Now, a design table is created that will have four configurations for making four variants of tumblers.

Now, it is decided that only four variants of tumblers will be produced of Outer Diameters 35mm, 40mm, 45mm & 50mm. Finally, a formula is created to control the edge fillet of the Tumbler as: Edge Fillet Radius = 0.05*Outside Diameter.Now, a formula is created to control the length of the tumbler by using Pad length as: Pad Length = 2* Outside Diameter.Similarly, a formula is created to control Inner Diameter of tumbler as: Inner Radius = 0.45*Outer Diameter.Outer Radius of tumbler is linked with the created parameter Outside Diameter as Outer Radius = Outer Diameter/2.Hence, the following formulas are created: In this case, the inner diameter, length & edge fillet of tumbler must change as per the outer diameter of the tumbler. Now, Formulas need to be created to interlink various dimensions from the Driving Parameters. Hence, a Parameter of “length” type named Outer Diameter is created. For example, in this tumbler there is only one input parameter i.e., Outer Diameter and rest of the dimensions will automatically get adjusted as per the Outer Diameter. Now, design intent is to design a tumbler in which the same ratio is maintained for all the other geometrical features for any value of outer diameter of tumbler.Ĭreate Parameters for input dimensions. The features used in this tumbler are Pad, Pocket and Edge Fillet. In the below image, a tumbler is modelled. Selecting each configuration from design table will result in a different variant of the product.Ĭreate the 3D Model as per the drawing provided using different workbenches like Sketcher, Part Design etc. A design table can be created in which five configurations of input values of parameters can be entered. For example, a company has five variants of a product. csv (Excel) file which contains different set of input values for parameters called configurations. For example, to have Inner Diameter as half of Outer Diameter, a formula can be created as:ĭesign Table is a text or.

In Parametric Modelling, the Parameters which user creates for controlling the dimensions and features are called User Parameters.įormulas are the relations between different geometrical entities and parameters. Intrinsic Parameters are created automatically as we create the geometries and features in CATIA V5. Parameters could be of different types such as Length, Area, Mass, Boolean and many more. Parameters are the characteristics that control different aspects of geometry and features. Key tools used in Parametric Modelling are: If any one of the dimensions is changed in 3D Model, then all other dimensions will also change in the specified ratio. The dimensions in a 3D Model have some relationships or interconnections with each other in Parametric Modelling in CATIA V5.
