CoordinateSpaceTree MoveSubtree Method Cognex VisionPro 9.22

Move the subtree rooted at SpaceName and attach it to the NewParentSpaceName, using SpaceName's existing parent transform.

Namespace: Cognex.Vision
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.22.2.0
Syntax

public void MoveSubtree(
	string spaceName,
	string newParentSpaceName,
	AddSpaceConstants duplicateHandling
)

Parameters

spaceName
Type: System String
A valid nonqualified or fully-qualified space name that indicates the root space of the subtree to move.
newParentSpaceName
Type: System String
The valid nonqualified or fully-qualified space name of the parent space to which to append the subtree.
duplicateHandling
Type: Cognex.Vision AddSpaceConstants
A AddSpaceConstants value that specifies what do if the parent coordinate space contains an immediate child with the same name as spaceName. The options are to return an error, replace the named child with the copied subtree, or do nothing. duplicateHandling defaults to DuplicateIsError : it treats a duplicate as an error.
Exceptions

ExceptionCondition
ArgumentExceptionspaceName cannot be the root space. NewSpaceName cannot be a descendant of spaceName.
ArgumentExceptionThe duplicateHandling value is not a member of AddSpaceConstants.
SpaceTreeExceptionspaceName is already a child of the NewParentSpaceand the duplicateHandling argument is DuplicateIsError.
SpaceTreeExceptionspaceName or NewSpaceName value is not a legal space name.
SpaceTreeExceptionspaceName or NewSpaceName is a nonqualified space name and more than one instance of it exists in this tree.
Remarks

SubtreeMoved Raised when a subtree is moved within this tree.

Remarks

Moves the subtree rooted at the given space name to the new parent space name. Attaches the given space name using its existing parent transform.

See Also