Page node

The <Page> node collects the input parameters of the PythonPart, which are displayed in a page of the property palette. For each page, a tab control is created in the palette, unless there exists only one page.

To group the input parameters in meaningful sections, multiple <Page> nodes can be created in the pyp file as follows:

<?xml version =”1.0” encoding =”utf-8”?>
<Element>
<Script>
</Script>
<Page>
<Name>FirstPage</Name>
<Text>Page text 1</Text>
<TextId>1001</TextId>

<Parameter>
</Parameter>
<Parameter>
</Parameter>
</Page>
<Page>
<Name>SecondPage</Name>
<Text>Page text 2</Text>
<TextId>1002</TextId>
<Visible>ShowPage2 == True</Visible>

<Parameter>
</Parameter>
</Page>
<Element>

The following tags can be used to define the general page data:

Tag

Optional

Description

<Name>

No

Name of the page

<Text>

No

The text entry is used as description for the tab in case of multiple pages.

<TextId>

Yes

Text ID of the <Text>, used for localization of the PythonPart.

<Visible>

Yes

Value or condition of show/hide the page input control in the property palette

<Enable>

Yes

Value or condition of enable/disable the page input control in the property palette

Sometimes it’s useful to disable or hide all page parameter depending on the value of another parameter. This is achieved by adding additional tags to the parameter or by defining functions in the py-file. See Enable and visible options


If there are no entries in the <Page> node, at least an empty property palette is displayed. In case of multiple <Page> nodes, empty page nodes are not displayed. If more than one <Page> node exists, a tab control is displayed in the property palette for each node.

As a result, the property palette from the page example above (with needed additional parameter nodes) looks like this:

../../_images/Page.png

The <Parameter> nodes are used to define the parameters of the PythonPart and the corresponding input controls in the property palette.

Hidden page

A special page can be created with the page name “__HiddenPage__”. All parameters added to this page are hidden and can be used to add additional values, which are created in the py file, to the PythonPart. Use cases for such a parameter are

  • object UUIDs for selected elements, which are used to retrieve the new element data in the PythonPart modification

  • geometry values, needed for the PythonPart modification

  • Attributes, which are set in the py file