IWxGroup.AllowObjectSelection

Syntax

AllowObjectSelection: Boolean;

AllowObjectSelection: boolean;

Description

The AllowObjectSelection property determines whether objects can be selected within a group.If the property is set to True, objects within a group are selected, if the property is set to False, they are not selected.

The default property value is True.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing group of objects with the Shape3 identifier.

Add links to the Andy, Drawing, Metabase system assemblies.

Sub Userproc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Group: IWxGroup;
    Shapes: IWxShapes;
Begin
    
// Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    Shapes := ws.Shapes;
    ws.BeginUpdate;
    Group := ws.Shapes.FindById(
"Shape
3"As IWxGroup;
    Group.AllowObjectSelection := 
False;
    ws.EndUpdate;
    (ws 
As IMetabaseObject).Save;
End Sub Userproc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Group: IWxGroup;
    Shapes: IWxShapes;
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    ws := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    Shapes := ws.Shapes;
    ws.BeginUpdate();
    Group := ws.Shapes.FindById(
"Shape
3"As IWxGroup;
    Group.AllowObjectSelection := 
False;
    ws.EndUpdate();
    (ws 
As IMetabaseObject).Save();
End Sub;

After executing the example selection of object within a group is disabled.

See also:

IWxGroup