IMsModel.TreatNullsAsZeros

Syntax

TreatNullsAsZeros: Boolean;

Description

The TreatNullsAsZeros property determines whether to replace empty values with zeroes on model calculation.

Comments

Empty value is Null.

TreatNullsAsZeros:

NOTE. The IMsModel.TreatNullsAsZeros and IMsProblemCalculation.TreatNullsAsZeros properties work together by the OR condition. For example, if the TreatNullsAsZeros model is set to False, and the TreatNullsAsZeros problem calculating this model is set to True, empty values are replaced with zeroes.
This capability enables the user to manage replacing empty values with zeroes both for each model individually and for all models calculated by the problem.

Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a model with the MODEL 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", mb.GetObjectKeyById("MS")).Edit;
    Model := mObj As IMsModel;
    Model.TreatNullsAsZeros := True;
    mObj.Save;
End Sub UserProc;

After executing the example empty values are replaced with zeroes on model calculation.

See also:

IMsModel