convert_objects#
- dlubal.api.rfem.Application.convert_objects(self, *, convert_into: ConvertObjectInto, objects: list, model_id: ModelId | None = None)#
Converts specified objects into different objects
- Parameters:
convert_into (ConvertObjectInto) – Specifies conversion type
objects (ObjectList) – Objects to be converted
model_id (ModelId | None) – Unique identifier of the model.
Example
ifc_model_objects = rfem_app.get_object_list([rfem.ifc_objects.IfcModelObject()])
straight_members = list()
# Find IFC objects that will be converted to straight members
for ifc_object in ifc_model_objects:
ifc_type = ifc_object.ifc_type
if ifc_type in ["IfcColumn", "IfcBeam"]:
straight_members.append(ifc_object)
# Make the conversion
rfem_app.convert_objects(
convert_into=rfem.ConvertObjectInto.CONVERT_IFC_OBJECT_INTO_STRAIGHT_MEMBER,
objects=straight_members,
)