Count: Integer;
The Count property returns the number of primitives in dictionary selection schema.
Sub Main;
Var
MB: IMetabase;
ObjDesc: IMetabaseObjectDescriptor;
DimSelSchema: IDimSelectionSchema;
i: Integer;
Begin
MB:=MetabaseClass.Active;
ObjDesc:=MB.ItemById("TAB_DIM");
If ObjDesc.Children.Count<>0 Then
If ObjDesc.Children.Item(0).ClassId=1030 Then
DimSelSchema:=ObjDesc.Children.Item(0).Bind As IDimSelectionSchema;
i:=DimSelSchema.Count;
End If;
End If;
End Sub Main;
After executing the example the "i" variable contains the number of primitives in the first schema of dictionary selection. Dictionary identifier: TAB_DIM.
See also: