get_obj_id#

TwinBuilderComponents.get_obj_id(assignment: str) int | None#

Retrieve the ID of an object.

Parameters:
assignmentstr

Name of the object.

Returns:
bool

True when successful, False when failed.

Examples

>>> from ansys.aedt.core import Circuit
>>> aedtapp = Circuit()
>>> sch = aedtapp.modeler.schematic
>>> c = sch.create_capacitor(value=1e-12)
>>> c_id = sch.get_obj_id(c.name)