Parameter with a static attribute ID¶
The value of the PythonPart parameter can be defined as an attribute by assigning the optional tag
<AttributeId>xxx</AttributeId>
to the <Parameter> tag.
The input control for the attribute in the property palette is automatically created using the defined control type of the attribute if the <ValueType> is set to Attribute
Syntax¶
<Parameter>
<Name>FireRiskFactor</Name>
<Text>Fire risk factor</Text>
<Value>A1</Value>
<ValueType>Attribute</ValueType>
<AttributeId>1398</AttributeId>
</Parameter>
Example¶
The implementation of the Attribute value type is described in the example Attributes, which is located in
…\etc\Examples\PythonParts\PaletteExamples\Attributes.pyp
…\etc\PythonPartsExampleScripts\PaletteExamples\Attributes.py