ICalcObject.IsUseExtObject

Syntax

IsUseExtObject: Boolean;

Description

The IsUseExtObject property determines whether repository object located outside a container or a business application are used.

Comments

If a calculation algorithm is located in a container or a business application, only the repository objects containing in the appropriate container or business application can be used for block setup.

Available values:

Example

Executing the example requires a container with the CONTAINER identifier, which contains a calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contain a calculation block. A calendar dictionary with the CALENDAR identifier should also be created in the repository.

Add links to the Algo, Metabase, Ms, Transform system assemblies. Add links to the assemblies required for working with calculation algorithms.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    RubrDescr, Descr, Dict: IMetabaseObjectDescriptor;
    CalcAlgo: ICalcAlgorithm;
    CalcBlock: ICalcBlock;
    List: ICalcObjectsList;
    Algo: ICalcObject;
    Params: IMsModelParams;
    CalcBlockParam: IMsModelParam;
Begin
    MB := MetabaseClass.Active;
    // Get container
    RubrDescr := MB.ItemById("CONTAINER");
    Descr := RubrDescr.EditDescriptor;
    // Get calculation algorithm
    MObj := MB.ItemByIdNamespace("ALGORITHM", Descr.Key).Edit;
    Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
    CalcAlgo := Algo As ICalcAlgorithm;
    // Get calendar dictionary located outside a container
    Dict := MB.ItemById("CALENDAR");
    // Get list of calculation algorithm objects
    List := CalcAlgo.Items;
    // Get the first calculation block
    CalcBlock := List.Item(0As ICalcBlock;
    // Determine the use of any repository objects on block setup
    CalcBlock.IsUseExtObjects := True;
    // Create a new block parameter
    Params := CalcBlock.Params;
    CalcBlockParam := Params.Add;
    CalcBlockParam.ParamType := TsParamType.Selection;
    CalcBlockParam.LinkedObject := Dict;
    // Save changes
    CalcBlock.SaveObject;
End Sub UserProc;

After executing the example, a calculation block parameter will be added that is linked with the dictionary located outside the container.

See also:

ICalcObject