Script
Last update: 16.07.2026class compolyx.Script(name, *, parent=None, source=None, active=True, uptodate=False, update_mode=ScriptUpdateMode.ON_TRIGGERS)
Represents user-defined scripts operating on the input parameters.
Attributes
| Name | Description |
|---|---|
Script.active |
Whether the script should run or not. |
Script.enabled |
Indicates whether the object is enabled. |
Script.is_dict_item |
Indicates whether the object is an item in a dictionary. |
Script.is_list_item |
Indicates whether the object is an item of a list. |
Script.link_path |
Root path of the current node in the tree for links to this object. |
Script.name |
Name of the object. |
Script.parent |
Parent object in the tree. |
Script.root_path |
Root path of the current node in the tree. |
Script.source |
Source code of the user-defined script. |
Script.status |
String status indicating if the object is up-to-date. |
Script.status_changed |
Specifies if the object has changed, for the purposes of notifying workbench. |
Script.update_mode |
Defines which changes cause the script to become out-of-date. |
Script.uptodate |
Whether the script execution is up to date. |
Methods
| Name | Description |
|---|---|
Script.find_parent(type) |
Steps up the tree and returns the first parent with given type. |
Script.run() |
|
Script.serialize() |
Serialize to Python string. |
Script.source_default() |
|
Script.update() |
|
Script.visit(visitor) |
Walk through the tree and let the visitor perform action on every descendant node. |