close_model#

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

Closes model specified by model id

Parameters:

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.

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


Example

from dlubal.api import rfem
from dlubal.api import 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
    )