IMsModel.SaveZeros

Syntax

SaveZeros: Boolean;

Description

The SaveZeros property determines whether zero values obtained on model calculation should be saved.

Comments

Available values:

NOTE. The IMsModel.SaveZeros and IMsProblemCalculation.SaveZeros properties are working together using the AND condition. For example, if the SaveZeros model is set to True, and the SaveZeros problem calculating this model is set to False, after problem calculation only non-zero values are saved to the database.
This capability enables the user to control zero value saving both for each model and for all models calculated by the problem.

Example

Executing the example requires that repository contains a modeling container with the MS identifier containing a model with the MODEL_SAVEZEROS identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    mObj: IMetabaseObject;
    Model: IMsModel;
Begin
    mb := MetabaseClass.Active;
    mObj := mb.ItemByIdNamespace("MODEL_SAVEZEROS", mb.GetObjectKeyById("MS")).Edit;
    Model := mObj As IMsModel;
    Model.SaveZeros := False;
    mObj.Save;
End Sub UserProc;

After executing the example the model on calculation saves only non-zero values to the database.

See also:

IMsModel