Selection: IDimSelection;
The Selection property determines selection of primitive elements that is to be set or removed when dictionary selection schema is created.
Sub Main;
Var
MB: IMetabase;
Mobj: IMetabaseObject;
ObjDesc: IMetabaseObjectDescriptor;
DimSelSchema: IDimSelectionSchema;
SchemaPrimit: IDimSelectionSchemaPrimitive;
Begin
MB := MetabaseClass.Active;
ObjDesc := MB.ItemById("TAB_DIM");
If ObjDesc.Children.Count <> 0 Then
If ObjDesc.Children.Item(0).ClassId = MetabaseObjectClass.KE_CLASS_DIMSELECTIONSCHEMA Then
Mobj := ObjDesc.Children.Item(0).Edit;
DimSelSchema := Mobj As IDimSelectionSchema;
SchemaPrimit := DimSelSchema.Add(SelectionPrimitiveType.SpecifiedChildren);
(SchemaPrimit As IDimChildrenSelectionPrimitive).Selection.SelectElement(1, True);
Mobj.Save;
End If;
End If;
End Sub Main;
After executing the example a primitive selecting child elements is added to dictionary selection schema. The second dictionary element is added to primitive selection. The second element and all its child elements are selected on creating a selection schema. Dictionary identifier: TAB_DIM.
See also: