> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ElementSelectionRule

### *class* compolyx.ElementSelectionRule(graph, obj, parent=None)

Base class for rules.
This acts as an interface to the cpp object of the rules.
The base class implements `\_py_update` which is called after the cpp update. It sets the changed flag.
Since NameGraph derives from Observable, observers can listen on `changed`.

In order to support csv\_serialization, the classes have to implement a `_dict` method
and a list named `_csv_parameters`.
The `\_dict` method specifies which properties are written and `\_csv_parameters` specifies which parameters are read and
how they are parsed. The keys in `\_dict` and the elements in `\_parameters_csv` have to be consistent.
If the conversion from the string to an object is more than simple type conversion,
it can be implemented in `\_update_rule_from_csv`.

### Attributes

| Name | Description |
| - | - |
| [`ElementSelectionRule.active`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.active) | Active status of object |
| [`ElementSelectionRule.changed`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.changed) | Triggers Observable to dispatch changed message |
| [`ElementSelectionRule.enabled`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.enabled) | Whether this object is currently enabled or not |
| [`ElementSelectionRule.extent`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.extent) | extent of the rule |
| [`ElementSelectionRule.id`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.id) | ID of object |
| [`ElementSelectionRule.include_rule_type`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.include_rule_type) | Include type |
| [`ElementSelectionRule.is_dict_item`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.is_dict_item) | Specifies whether the object is an item of a dict |
| [`ElementSelectionRule.is_list_item`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.is_list_item) | Specifies whether the object is an item of a list |
| [`ElementSelectionRule.link_path`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.link_path) | Root path of the current node in the tree for links to this object |
| [`ElementSelectionRule.name`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.name) | Name of object |
| [`ElementSelectionRule.parent`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.parent) | Parent object in tree |
| [`ElementSelectionRule.relative_rule_type`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.relative_rule_type) | Relative type |
| [`ElementSelectionRule.root_path`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.root_path) | Root path of the current node in the tree |
| [`ElementSelectionRule.status`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.status) | Status of the object |
| [`ElementSelectionRule.status_changed`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.status_changed) | Boolean flag which is set to true in C++ when up-to-date status of object changes |
| [`ElementSelectionRule.uid`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.uid) | UID of object |
| [`ElementSelectionRule.vertex`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.vertex) | Throws an error if the object has been removed from the graph |

### Methods

| Name | Description |
| - | - |
| [`ElementSelectionRule.find_parent`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.find_parent)(type) | Steps up the tree and returns the first parent with given type |
| [`ElementSelectionRule.obj_exists`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.obj_exists)() | Checks if \_\_obj still references the C++ object (i.e. has not been reset to None by self.\_delete) and exists in the graph |
| [`ElementSelectionRule.serialize_name_and_id`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.serialize_name_and_id)() | Helper function to serialize name and ID |
| [`ElementSelectionRule.serialize_rule_types`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.serialize_rule_types)() | |
| [`ElementSelectionRule.update`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.update)() | |
| [`ElementSelectionRule.visit`](https://developer.synopsys.com/docs/acp/acp-in-app-scripting-api/2025-r2/_autosummary/compolyx.ElementSelectionRule.visit)(visitor) | Walk through the tree and let the visitor perform an action on every descendant node |
