Group parameter with a Python list

Individual parameter with value lists can be grouped to combine the controls with the same list item index into a block within the Properties palette.

../../../../_images/GroupOneDimList.png

Syntax

<Parameter>
<Name>ListGroup</Name>
<ValueType>ListGroup</ValueType>

<Parameter>
<Name>GroupExpander</Name>
<Text>“Field” + str($list_row + 1)</Text>
<ValueType>Expander</ValueType>

<Parameter>
<Name>SectionName</Name>
<Text>Section name</Text>
<Value>[“A”, “B”, “C”]</Value>
<ValueType>String</ValueType>
<Dimensions>SectionCount</Dimensions>
</Parameter>
<Parameter>
<Name>Length</Name>
<Text>Length</Text>
<Value>0</Value>
<ValueType>Length</ValueType>
<Visible>$list_row == SectionCount - 1</Visible>
<Enable>False</Enable>
</Parameter>
</Parameter>
</Parameter>

If the list items with the same index should be in the same palette row, the <Row> tag can be used. The result looks like this

../../../../_images/GroupOneDimListWithRow.png

Inside the <Text> tag of the Expander and the Row, the keyword $list_row can be used to display the index of the list item in the row. The resulting text is evaluated as Python formula.

The ListGroup node can also contain parameter without a value list. By using the $list_row keyword, the control of the parameter can be displayed for a defined index.

Example

The implementation of the ListGroup value type is described in the example ListValues, which is located in

…\etc\Examples\PythonParts\PaletteExamples\ListValues.pyp
…\etc\PythonPartsExampleScripts\PaletteExamples\ListValues.py