Selection: IDimSelection;
The Selection property determines selection of primitive of dictionary element group.
Sub Main;
Var
MB: IMetabase;
MObjDesc: IMetabaseObjectDescriptor;
MObj: IMetabaseObject;
ElemGroup: IDimElementGroup;
ElemGroupPrim: IDimElementGroupPrimitive;
Begin
MB:=MetabaseClass.Active;
If MB.ItemById("D_TO").Children.Count<>0 Then
MObjDesc:=MB.ItemById("D_TO");
MObj:=MObjDesc.Children.Item(0).Edit;
ElemGroup:=MObj As IDimElementGroup;
ElemGroupPrim:=ElemGroup.Item(0);
ElemGroupPrim.Selection.InvertAll;
MObj.Save;
End If;
End Sub Main;
After executing the example selection of the first primitive of the element group is inverted.
See also: