IWxShape.Workspace

Syntax

Workspace: IWxWorkspace;

Workspace: Prognoz.Platform.Interop.Andy.IWxWorkspace;

Description

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

Example

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;
Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    mb: Imetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
    
//Shapes: IWxShapes;
Begin
    
// Get workspace for editing
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    Shape := wsp.Shapes.Item[
0];
    Shape.SendToBack();
    System.Diagnostics.Debug.WriteLine(
"The object belongs to the workspace: " + Shape.Workspace.Name);
    
// Save changes
    (wsp As IMetabaseObject).Save();
End Sub;

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

See also:

IWxShape