close_model#

dlubal.api.rfem.Application.close_model(self, *, save_changes: bool, model_id: ModelId | None = None)#

Closes model specified by model id

Parameters:
  • save_changes (bool) – Specifies whether to save changes before closing the model

  • model_id (dlubal.api.common.model_id_pb2.ModelId | None) – Unique identifier of the model

Active model is used if this field is not set.


Example

from dlubal.api import rfem, common

with rfem.Application() as rfem_app:
    active_model_id = rfem_app.get_active_model().id
    rfem_app.close_model(
        model_id=common.ModelId(
            id=active_model_id),
            save_changes=False
    )