ICalcAlgorithm.Included

Syntax

Included(CalcObject: ICalcObject): Boolean;

None;

Parameters

CalcObject. Calculation algorithm object.

Description

The Included property determines including or excluding of object from calculation algorithm.

Comments

Available values:

Example

Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contains at least two objects.

Add a link to the Calculation Algorithm Core custom assembly contained in the Calculation Algorithms component, and links to the Algo, Metabase system assemblies.

Sub UserProc;
Var
    
MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
    List: ICalcObjectsList;
    CalcAlgo: ICalcAlgorithm;
    Block: ICalcObject;
Begin
    MB := MetabaseClass.Active;
    
// Get calculation algorithm
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, 
True);
    CalcAlgo := Algo 
As ICalcAlgorithm;
    
// Get list of calculation algorithm objects
    List := CalcAlgo.Items;
    
// Exclude the first object from calculation
    Block := List.Item(0As ICalcObject;
    CalcAlgo.Included(Block) := 
False;
    
// Check if there are changes in calculation algorithm
    If CalcAlgo.IsDirty Then
        
// Display name of excluded object in the console
        Debug.WriteLine("«" + Block.Name + "»" + " is excluded from calculation");
        
// Save changes in calculation algorithm
        CalcAlgo.Save;
    
End If;
End Sub UserProc;

Not provisioned.

After executing the example the first object of calculation algorithm is excluded from calculation. The console displays name of the excluded object, for example:

«Function block» is excluded from calculation

See also:

ICalcAlgorithm