Cog3DCoordinateSpaceTree MoveSubtree Method Cognex VisionPro 9.8
Move the subtree rooted at spaceName and attach it to the newParentSpaceName, using spaceName's existing parent transform.

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

public void MoveSubtree(
	string spaceName,
	string newParentSpaceName,
	CogAddSpaceConstants 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 name of the parent space to which to append the subtree.

duplicateHandling
Type: Cognex.VisionPro CogAddSpaceConstants

A CogAddSpaceConstants 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.

Events

Exceptions

ExceptionCondition
ArgumentException

spaceName cannot be the root space. newParentSpaceName cannot be a descendant of spaceName.

ArgumentOutOfRangeException

The duplicateHandling value is not a member of CogAddSpaceConstants.

CogSpaceTreeDuplicateChildNameException

spaceName is already a child of the newParentSpaceName and the duplicateHandling argument is DuplicateIsError .

CogSpaceTreeInvalidNameSyntaxException

spaceName or newParentSpaceName is not a legal space name.

CogSpaceTreeNameNotUniqueException

spaceName or newParentSpaceName is a nonqualified space name and more than one instance of it exists in this tree.

CogSpaceTreeNameNotInTreeException

spaceName or newParentSpaceName does not exist in 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