Parameter with a Python tuple¶
The value of the PythonPart parameter can be created as a Python tuple object, defined by the used value types. A combination with a Python list is possible.
Syntax¶
<Parameter>
<Name>TextData</Name>
<Text> </Text>
<Value>[(10|Cube)] * 5</Value>
<ValueType>tuple(Double,String)</ValueType>
</Parameter>
The values in the <Value> tag must be separated by the pipe | character. This is also required for a used <ValueTextId> tag.
If an empty or only a single text is used for the Text tag, all controls of the tuple values are created in one line in the property palette.
Example¶
The implementation of the tuple value type is described in the example ValueList, which is located in
…\etc\Examples\PythonParts\PaletteExamples\ValueList.pyp
…\etc\PythonPartsExampleScripts\PaletteExamples\ValueList.py