export_to#

dlubal.api.rfem.Application.export_to(self, *, filepath, export_attributes, model_id=None)#

Exports the model to the specified file format.

Parameters:
  • filepath (str) – The full path of the file where the model will be exported.

  • export_attributes (Any) – Specifies the format and attributes for the export. Supported message types: PythonGrpcExportAttributes IfcExportAttributes

  • model_id (ModelId | None) – The unique identifier of the model. If None, the active model is used.

Returns:

None


Usage

# --- Export model to Python ---
rfem_app.export_to(
    filepath=os.path.abspath('model_export.py'),
    export_attributes=common.import_export.PythonGrpcExportAttributes()
)

# --- Export model to IFC ---
rfem_app.export_to(
    filepath=os.path.abspath('model_export.ifc'),
    export_attributes=common.import_export.IfcExportAttributes()
)