Do not use External Values Directly in Rules
- Last UpdatedNov 23, 2023
- 1 minute read
An expression for a template dimension may require a value derived from a design item not included in the template; for example, the thickness of the owning panel when a panel fitting template is instanced in a design. Always define such a value as a template property (DDAT), with a default setting; do not use the external value directly in a template rule. This is because the owning design item does not exist in the template world, and so running a rule will fail unless a default value is available to be used while the template is being defined. The setting of the Panel Thickness property in Step 3 of Defining the Template Properties, with its default dimension, gave an example of this.
The same principle applies when the template includes variable specification references to other items (which may, or may not, be templates themselves). Again, the specification reference must be defined in the template’s dataset so that the default specification can be used to validate the template rules. The selection of the equipment end types in Setting References to Sub-equipments gave an example of this process.