IWxShape.Workspace

Syntax

Workspace: IWxWorkspace;

Description

The Workspace property returns a shape owner, that is, a workspace.

Example

Executing the example requires that the repository contains a workspace with the WSP identifier that contains a shape.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    Mb: Imetabase;
    Wsp: IWxWorkspace;
    Shape: IWxShape;
Begin
    // Get workspace for editing
    Mb := MetabaseClass.Active;
    Wsp := Mb.ItemById("WSP").Edit As IWxWorkspace;
    Shape := Wsp.Shapes.Item(0);
    Shape.SendToBack;
    Debug.WriteLine("This object belongs to the workspace: " + Shape.Workspace.Name);
    // Save changes
    (Wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the console window displays the name of the workspace, to which this shape belongs.

See also:

IWxShape