import_from#

dlubal.api.rfem.Application.import_from(self, *, filepath, import_attributes, model_id=None)#

Imports data into the model from the specified file format.

Parameters:
Returns:

None


Usage

# --- Import from IFC ---
rfem_app.import_from(
    filepath=os.path.abspath('ifc_structure.ifc'),
    import_attributes=common.import_export.IfcImportAttributes()
)
# Edit IFC model
ifc_model: rfem.ifc_objects.IfcFileModelObject = rfem_app.get_object(
    obj=rfem.ifc_objects.IfcFileModelObject(no=1)
)
ifc_model.mirror_axis_z=True
rfem_app.update_object(obj=ifc_model)


# --- Import from XML ---
rfem_app.import_from(
    filepath=os.path.abspath('xml_structure.xml'),
    import_attributes=common.import_export.XmlImportAttributes()
)


# --- Import from RSECTION ---
rfem_app.import_from(
    filepath=os.path.abspath('cross_section.rsc'),
    import_attributes=common.import_export.RsectionImportAttributes()
)

Examples