Delete the subtree rooted at SpaceName. SpaceName and all of its children will be recursively removed from tree.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax
Parameters
- spaceName
- Type: System String
A valid nonqualified or fully-qualified space name that indicates the root space of the tree to delete.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | spaceName cannot be the root space. |
| CogSpaceTreeInvalidNameSyntaxException | spaceName value is not a legal space name. |
| CogSpaceTreeNotUniqueException | spaceName is a nonqualified space name and more than one instance of it exists in this tree. |
Remarks
Deletes the subtree rooted at the given space name. All children of the space are recursively removed from the tree.
If DeleteSubtree(String) encounters the root node of a tree embedded using the AddTree(String, CogCoordinateSpaceTree, ICogTransform2D, Boolean, CogAddSpaceConstants) method, it unlinks the embedded tree, and other clients of that tree can continue to use it.
See Also