How You Use Attributes in Model Rules
When defining a rule, you select model nodes that will participate in the rule. You can also use attributes associated with model nodes in your rule definition.
Use the syntax provided in the following table to
refer to types of node attributes and obtain their values. In the
Syntax column, <nodePath>
represents
the node path to a node, and <attrName>
represents the name of an attribute of that node.
Attribute Type |
Syntax |
Examples |
---|---|---|
User-defined attributes |
If a model node has user-defined attributes, you can insert them in rule definition text from the Item tab of the Attributes pane of the rule editor. Select an attribute and click the Insert into Rule Text button. The values of user-defined attributes are static at run time, since the values are part of the model definition. |
|
Supplemental attributes |
If a model node has supplemental attributes, you can insert them in rule definition text from the Supplemental tab of the Attributes pane of the rule editor. Select an attribute and click the Insert into Rule Text button. The values of supplemental attributes are static at run time, since the values are part of the model definition. |
|
Transactional attributes |
If a model node has a transactional attribute, you can insert them in rule definition text from the Structure pane of the rule editor. Select a transactional attribute from the structure tree and click the Insert into Rule Text button. The values of transactional attributes are dynamic at run time, since the values are determined during a configuration session by user action or model rules. The example divides the linear length of a window by 5 (5 feet in length for material) and adds it to the number of standard tracks needed. |
|
Configurator system attributes, such as:
|
You can insert system attributes in rule definition text from the System tab of the Structure pane of the rule editor. Select an attribute and click the Insert into Rule Text button. |
|
When using transactional attributes in rule expressions, observe the following:
-
To refer to a specific attribute value, you can't reference it with a path-style notation, as if it were a child of the attribute. You must reference it as a literal in a conditional expression, such as:
(x) EXCLUDES (y.transAttrs["BaseWeight"] < 10)
-
You can't use the Configurator system attribute
Selection()
on a TIA, even if it has an enumerated value set that's displayed at run time. like an option feature. Option features do supportSelection()
-
You can map a constraint over all occurrences of a particular TIA within a set of nodes. Use expression syntax such as the following example, which constrains against the selection or entry of the value 1 for the TIA
Weight
when the node X has a value of 1.(x = 1)EXCLUDES OC.Selection().transAttrs["Weight"] = 1