Insert Attributes Into Your Rules
You can insert various types of attributes into your rule text.
Use this format:
nodePath
is the path to a node on your model.attrName
is the name of an attribute of the node.
You use a different procedure for each type of attribute.
Type of Attribute | Format | Example |
---|---|---|
Custom attribute that you create on the model |
Assume you create an attribute named Color:
Your user's actions and your rules don't affect the attribute's value, so the attribute value is static at run time. |
'Home Theater System'.'Speaker
System'.userAttrs["PhysicalAttributes.Color"] |
Supplemental |
Do the same steps that you do to add a custom attribute, except click Supplemental. Your user's actions and your rules don't affect the attribute's value, so the attribute value is static at run time. |
'Home Theater System'.'Speaker
System'.suppAttrs["color"] |
Transactional |
Select the attribute in the Structure area of the rule editor, then click Insert Into Rule Text. Your user's actions and your rules affect the attribute's value, so the value of a transactional attribute is dynamic at run time. |
Here we have an example that includes a window and window track. Each track is 5 feet long. This example divides the linear length of the window by 5, then adds it to the number of tracks that the window needs. |
System attribute, such as:
|
Do the same steps that you do to add a custom attribute, except click Supplemental. |
'Home Theater System'.'Speaker
System'.'5.1'.Quantity() |
Guidelines for Using Transactional Attributes in Your Rule
You can map a constraint to all occurrences of a transactional attribute in a set of nodes. For example, if node x has a value of 1, then prevent the user from selecting or entering a value 1 for the Weight transactional attribute:
(x = 1)EXCLUDES OC.Selection().transAttrs["Weight"] = 1
You can't use a path to reference a value for a transactional attribute. You must reference the value as a literal in a conditional expression. For example:
(x) EXCLUDES (y.transAttrs["BaseWeight"] < 10)
You can't use the Selection
system attribute with a transactional
attribute. This restriction applies even if the transactional attribute has a value set
that Configurator displays at run time, such as the values that it displays for an
option feature. However, you can use Selection
with an option
feature.
For background details, see Transactional Attributes.