get_object#

dlubal.api.rstab.Application.get_object(self, obj, model_id=None)#

Retrieves a single object from the model using its number.

Parameters:
  • obj (obj) – An object to be retrieved defined by its number. See Model.

  • model_id (ModelId | None) – Unique identifier of the model. If None, the active model is used.

Returns:

A retrieved object.

Return type:

Model


Usage

# Get Node number 1 from the active model and print its coordinates
node: rstab.structure_core.Node = rstab_app.get_object(
    rstab.structure_core.Node(no=1)
)
print(f"Coordinates:\n{node.coordinates}")

Tip

While casting is not required in Python, explicitly specifying the object’s type (e.g., node: rstab.structure_core.Node) can enhance IntelliSense and code completion.

Output

Coordinates:
y: 1
z: -3