IMetabaseObjectControlInfo.Count

Syntax

Count: Integer;

Description

The Count property returns the number of nested objects, the parameters of which can be controlled.

Example

Executing the example requires a cube with the STD_CUBE identifier in repository. Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Obj, ControlObj: IMetabaseObjectDescriptor;
    ControlInfo: IMetabaseObjectControlInfo;
    Control: IMetabaseObjectControl;
    ParamControl: IMetabaseObjectParamControl;
    Param: IMetabaseObjectParam;
    i, j: Integer;
Begin
    MB := MetabaseClass.Active;
    Obj := Mb.ItemById("STD_CUBE");
    ControlInfo := Obj.Params.ControlInfo;
    For i := 0 To ControlInfo.Count - 1 Do
        Control := ControlInfo.Item(i);
        ControlObj := Control.ControlledObject;
        Debug.Write("Nested object: " + ControlObj.Name + '(' + ControlObj.Id + ").");
        If Control.Count = 0 Then
            Debug.WriteLine(" Parameters are absent.");
        Else
            Debug.WriteLine("");
            Debug.Indent;
            For j := 0 To Control.Count - 1 Do
                ParamControl := Control.Item(j);
                Param := ParamControl.ControlledParam;
                Debug.WriteLine("Parameter: " + Param.Name + '(' + Param.Id + ").");
            End For;
            Debug.Unindent;
        End If;
    End For;
End Sub UserProc;

After executing the example the development environment console displays information about cube nested objects and their parameters.

See also:

IMetabaseObjectControlInfo