IMetabaseObject.InitControlledParams

Syntax

InitControlledParams(ObjKey: Integer; ObjParams: IMetabaseObjectParamValues);

Parameters

ObjKey - key of the nested object which parameters values are necessary to calculate.

ObjParams - collection of values of parameters in which the calculated values are placed.

Description

The InitControlledParams method calculates the expressions of the nested object parameters management.

Comments

On executing this method, parameters values, with which an embedded object can be opened while opening this object, are put in the ObjParams collection.

Example

Executing the example requires an object with the Obj_1 identifier that contains one parameter. This object is based on any additional object for which the parameters management was set.

Sub UserProc;
Var
    MB: IMetabase;
    ParentObj: IMetabaseObject;
    DepDesc: IMetabaseObjectDescriptor;
    Params: IMetabaseObjectParamValues;
    Param: IMetabaseObjectParamValue;
Begin
    MB := MetabaseClass.Active;
    //Source object
    ParentObj := MB.ItemById("Obj_1").Bind;
    //Nested object
    DepDesc := ParentObj.Dependencies(False).Item(0);
    Params := DepDesc.Params.CreateEmptyValues;
    //Calculation of parameters with which the nestednbsp;objectnbsp;isnbsp;opened
    ParentObj.InitControlledParams(DepDesc.Key, Params);
    Debug.WriteLine("Parameters of the nestednbsp;objectquot;);
    For Each Param In Params Do
        Debug.WriteLine("Parameter: " + Param.Id + "(" + Param.Name + "); Value: " + Param.Value);
    End For;
End Sub UserProc;

After executing this example parameters values that are used to open embedded object while opening the source object Obj_1 are calculated. On calculation default parameters values of a source object are used. Names and values of the parameters of the nested object are displayed in the development environment console.

See also:

IMetabaseObject