parsing_helpers
freecad.datamanager_wb.domain.parsing_helpers
¶
Parsing helpers for workbench UI display strings.
This module centralizes small string parsers used to interpret parent.child
references and expression list display text.
parse_expression_item_object_name(text)
¶
Extract the FreeCAD object name from an expression display string.
The expressions list displays items like "Object.Property = expr".
This helper extracts the object name portion ("Object").
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Expression list display string. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The owning object name if it can be parsed, otherwise |
Source code in freecad/datamanager_wb/domain/parsing_helpers.py
parse_varset_variable_item(text)
¶
Parse a UI list item of the form VarSetName.VariableName.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Display text from the variables list. |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, str] | None
|
Tuple of |
tuple[str, str] | None
|
otherwise |