Design Syntax

The following example illustrates the syntax for a basic design:

Design Box_1 : BoxAssy

   Rule height As Number = 100
   Rule width As Number = 150
   Rule depth As Number = 200 

End Design

The Box_1 design contains the three rules we previously defined to supply the major dimension of a simple box. In this example, the Box design inherits from its parent design BoxAssy. If there were auxiliary designs, their names would appear to the right of the parent design name. The parent design might define additional properties, as well as specific rules to control how the box is assembled or oriented.

There is no restriction on including rules in parent designs. However, it is not uncommon to use an empty parent design for the purpose of organizing subordinate designs in the Design tree.

A colon (:) separates the declared design name and the parent design name. A single space separates any auxiliary design names to the right of the parent.

All designs begin with the keyword Design , and terminate with End Design . Nested designs are not allowed.

Note: Design and End Design must each appear on their own line - separate from the rest of the body of the design.

Design Name

The name of a design (also called an identifier) must begin with:
  • an alphabetic character
  • an underscore (_)
  • a percent sign (%)
Note: For more information, click Name link following.
Design names can contain any number of alphabetic characters, numeric characters, underscores, question marks (?), or percent signs. Intent ignores the case of a design name. The following names are considered to be the same when evaluated by Intent:
  • squaretube
  • SquareTube
  • squareTube
Tip: Use a consistent naming convention for designs. Autodesk designs and rules follow CamelCase naming style. Others may prefer underscore separator style.

Comments

A comment begins with either an ASCII single-quote character (‘), a Unicode left single-quote character (U+2018), or a Unicode right single-quote character (U+2019). A comments spans from its origination on a physical line to the end of the same physical line. The Intent compiler ignores any characters from the beginning of the comment through to the line terminator. The following example adds comments to a design.

‘Dimensions for simple box (in mm)
Design Box_1 : BoxAssy  

   Rule height As Number = 100   ‘default height
‘  Rule altHeight As Number = 125
   Rule width As Number = 150
   Rule depth As Number = 200  

End Design
Note: Comments cannot extend across multiple lines.