import_from#

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

Imports data into the model from the specified file format.

Parameters:
Returns:

None


Usage

from dlubal.api import common

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

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

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

Examples