To define an ACT-based property as a parameter, add the attribute
isparameter
to the XML file and set it to true.
For example, the following code creates a property named
float_unit
. The property is a pressure and its value is a
float.
<property name="float_unit" caption="float_unit" control="float" unit="Pressure" isparameter="true"/>
Note: Other attributes such as default
and
isload
can also be added. When adding a default value
for a quantity, you must define both the value and the unit, placing the unit in
brackets like this: default="12 [C]"
The attribute isparameter
adds a check box to the
Details view for the property, making it possible for this
property to be selected for parameterization.
Once the property is selected for parametrization, it automatically displays in both the Outline and Table views for the Parameter Set bar.
The following code is extracted from the XML file for this example. You can see
how the definition of the property float_unit
is incorporated
into the file.
<load name="CustomPressure" version="1" caption="CustomPressure" icon="tload" support="false" isload="true" color="#0000FF"> <callbacks> <getsolvecommands order="1">writeNodeId</getsolvecommands> </callbacks> <property name="Geometry" caption="Geometry" control="scoping"> <attributes selection_filter="face"/> </property> <property name="float_unit" caption="float_unit" control="float" unit="Pressure" isparameter="true"/> </load>