get_object#
- dlubal.api.rstab.Application.get_object(self, obj, model_id=None)#
Retrieves a single object from the model using its number.
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.
// Get Node number 1 from the active model and print its coordinates
Rstab.StructureCore.Node node_1 = await RstabApp.get_object<Rstab.StructureCore.Node>(
new Rstab.StructureCore.Node{ No = 1 }
);
Console.WriteLine($"Coordinates:\n{node_1.Coordinates}");
Output
Coordinates:
y: 1
z: -3