Rule References

There are several ways to reference a rule in Intent. If the rule is in the same design, the name of the rule is used. In the following example, the rules tubingSize and width are in the design.

Rule tubingSize As Number = 75
Rule width As Number = 800
Child topMember As :squareTube
   size = tubingSize
   cut1 = 1
   cut2 = 1
   length = width
End Child

In the child rule, size references the value of tubingSize, and length references the value of width.

Optionally, the keyword me can be used to reference the current design. For example:

Child topMember As :squareTube
   size = me.tubingSize
   cut1 = 1
   cut2 = 1
   length = me.width
End Child
Note: Intent language uses the Reference Operator (dot) for references.

Reference Chain

Most references in rules are local. However, you can reference rules in parts that are hierarchically above or below the current part. The following example references the thickness rule in the footPlate part, which is a child of rightLegAssembly.

rightLegAssembly.footPlate.thickness

This type of reference chain works best when used as a downward reference, for example, if rightLegAssembly is a child of the current part. An upward reference with specific part names is less reliable, as it requires that a hierarchy exist whose part names exactly match the reference chain.

The built-in rule Parent is used to get the current part’s parent in the Intent assembly. The following expression returns the value of the width rule from the parent.

Parent.width

By default, if a part does not have a particular rule, owned by its design or by an inherited design, Intent will look up to the part’s parent to find the rule. If the parent does not contain the rule, Intent will continue to look up the assembly tree to find the rule. If the rule is not found in any ancestor, an error is raised.