Workspace: IWxWorkspace;
The Workspace property returns a shape owner, that is, a workspace.
Executing the example requires that repository contains a workspace with the WSP identifier containing 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("The 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: