IWxShapes.FindById

Syntax

FindById(Id: String): IWxShape;

Parameters

Id. Shape identifier.

Description

The FindById method searches for a shape by the identifier.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing a group of shapes, one of them is with the Shape1 identifier.

Add links to the Andy and Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    Shapes: IWxShapes;
    Shape: IWxShape;
    Group: IWxGroup;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    wsp.BeginUpdate;
    Shapes := wsp.Shapes;
    Shape := Shapes.FindById("Shape1");
    Group := Shape.Parent As IWxGroup;
    Group.AllowObjectSelection := False;
    wsp.EndUpdate;
    (wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example object selection within a group is disabled. The object with the Shape1 identifier is a group member.

See also:

IWxShapes