CogCoordinateSpaceTree DeleteSubtree Method Cognex VisionPro 9.8
Delete the subtree rooted at SpaceName. SpaceName and all of its children will be recursively removed from tree.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.1.0.0
Syntax

public void DeleteSubtree(
	string spaceName
)

Parameters

spaceName
Type: System String

A valid nonqualified or fully-qualified space name that indicates the root space of the tree to delete.

Exceptions

ExceptionCondition
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