Parameter with a dynamic attribute ID list¶
In Parameter with a dynamic attribute ID the value type AttributeIdValue is used to create an input control for a dynamic attribute value. Using this value type for a list allows to create a dynamic attribute list input.
<Parameter>
<Name>DynamicAttributeList</Name>
<Text>Attributes</Text>
<Value>[(0,)]<</Value>
<ValueType>AttributeIdValue</ValueType>
<ValueDialog>AttributeSelectionInsert</ValueDialog>
</Parameter>
Clicking to the button displayed to the right of the control can be used to
add a new attribute to the list
remove an attribute from the list
With the assigned value dialog, see Attribute dialog, the selectable attributes can be limited.
Example¶
The implementation of the AttributeIdValue is described in the example files located in
…\etc\Examples\PythonParts\PaletteExamples\Attributes.pyp
…\etc\PythonPartsExampleScripts\PaletteExamples\Attributes.py
…\etc\Examples\PythonParts\ServiceExamples\ProjectAttributeService.pyp
…\etc\PythonPartsExampleScripts\ServiceExamples\ProjectAttributeService.py