RemoveById(Id: String): Boolean;
RemoveById(Id: string): boolean;
Id. Shape identifier.
The RemoveById method removes a shape by identifier and returns whether the removal is successful.
The method returns False when a shape with identifier, passed with the Id parameter, is missing in the workspace.
Executing the example requires the object of the workspace type. Create a form, add the Button1 button to it, the WorkspaceBox component named WorkspaceBox1, the UiWorkspaceObject component named UiWorkspaceObject1, define the workspace as an object of the UiWorkspaceObject1 component, the UiWorkspaceObject1 component as the source of the WorkspaceBox1 component, and set the True value for the Active property of the UiWorkspaceObject1 component. The workspace contains a shape with the Shape54 identifier.
Add links to the Andy, Metabase, Workspace system assemblies.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
text := workspaceBoxNet1.View.Workspace.Shapes.RemoveById("Shape54").ToString();
End Sub;
On clicking the Button1 button, the shape with the Shape54 identifier is removed from the WorkspaceBox component area and the removal result is shown in the window header text.
See also: