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.

../../../../_images/TupleList.png

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.

Optional tags

All optional tags of the value types specified in <ValueType>tuple(…)</ValueType> can be used for the tuple parameter. An entry must be created for each value type, separated by a comma , character like

<MinValue> ,,,100,200</MinValue>`

For more information see Parameter with a Python namedtuple

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