gui_selection
freecad.datamanager_wb.ui.gui_selection
¶
GUI selection helpers for the DataManager workbench.
This module contains small utilities for selecting FreeCAD objects referenced by expression items.
The helper functions route FreeCAD/FreeCADGui access through FreeCadPort so
they can be tested (or at least imported) outside FreeCAD.
select_object_from_expression_item(expression_item, *, ctx=None)
¶
Select the FreeCAD object referenced by an expression item.
The expressions list in the panel can provide either:
- an ExpressionItem instance, or
- its display string (e.g. "Object.Property = expr").
This function resolves the owning object name and selects it in the model tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expression_item
|
ExpressionItem | str
|
Expression item object or expression display string. |
required |