Python scripting - Introduction



Python attributes


Create new attributes by Python. By default the names of each attribute is defined between the top of the Python file and the first “InitAttrib” method. The below picture shows an example of a process event in Python.


The variables on the left side are used in the whole Python file to create, get or set the value of an attribute.



To have a generic attribute definition, it is recommended to name the attributes by following rule:

User attribute variable name



User attribute name


e.g. Stw_StudType

Download attribute variable name



Download attribute name


e.g. Stw_Dl_StudType


Down- and upload of process event

A process event is an encapsulated container with information. A typical work flow for the event.


Event Initialize Attribute

PageParagraph_8 Create process (download) attributes.

Event Process Attributes

PageParagraph_8 Read values from user (operation) attribute.

PageParagraph_8 Write the value to the process attributes.

Event Compute (optional)

PageParagraph_8 e.g. create simulation cycle.


This work flow is necessary to be able to upload the event again, because we can only upload events and the event attributes. While uploading the event process attribute function is not called.




With the plugin manager comes the possibility to create dictionaries for different languages translation. The dictionary supports the definition of attribute and event names, created in Python. It is highly recommended to have at least an English dictionary for the custom defined attributes and events.

Page précédente
Page principale du chapitre
Page suivante