get_object#
- dlubal.api.rsection.Application.get_object(self, obj, model_id=None)#
Retrieves a single object from the model using only the no argument in the object arguments.
Usage
# Get Point number 1 from the active model and print its coordinates
point: rsection.structure_core.Point = rsection_app.get_object(
rsection.structure_core.Point(no=1)
)
print(f"Coordinates:\n{point.coordinates}")
Tip
While casting is not required in Python, explicitly specifying the object’s type (e.g., point: rstab.structure_core.Point
) can enhance IntelliSense and code completion.
// Get Point number 1 from the active model and print its coordinates
Rsection.StructureCore.Point point = await RsectionApp.get_object<Rsection.StructureCore.Point>(
new Rsection.StructureCore.Point{ No = 1 }
);
Console.WriteLine($"Coordinates:\n{point.Coordinates}");
Output
Coordinates:
y: 1
z: -3