ControlInfo: IMetabaseObjectControlInfo;
The ControlInfo property returns an object used to control parameters of embedded objects.
Executing the example requires that the repository contains an object with the OBJ_1 identifier. This object and all embedded objects used for its setting contain similar number of parameters.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Params: IMetabaseObjectParams;
ConInf: IMetabaseObjectControlInfo;
Con: IMetabaseObjectControl;
Param: IMetabaseObjectParamControl;
i, j: Integer;
Begin
MB := MetabaseClass.Active;
MObj := Mb.ItemById("Obj_1").Edit;
Params := MObj.Params;
ConInf := Params.ControlInfo;
For i := 0 To ConInf.Count - 1 Do
Con := ConInf.Item(i);
For j := 0 To Con.Count - 1 Do
Param := Con.Item(j);
Param.Expression.AsString := ":" + Params.Item(j).Id;
End For;
End For;
MObj.Save;
End Sub UserProc;
After executing the example the control of parameters of the nested objects is set up for the specified object. On opening an object after entering parameters values these values are also passed to open nested objects one-to-one.
See also: