Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
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. duplicateHandling defaults to DuplicateIsError: it treats a duplicate as an error.
| Exception | Condition |
|---|---|
| ArgumentException | spaceName cannot be the root space. NewSpaceName cannot be a descendant of spaceName. |
| ArgumentException | The duplicateHandling value is not a member of CogAddSpaceConstants. |
| CogSpaceTreeDuplicateChildNameException | spaceName is already a child of the NewParentSpaceand the duplicateHandling argument is DuplicateIsError. |
| CogSpaceTreeInvalidNameSyntaxException | spaceName or NewSpaceName value is not a legal space name. |
| CogSpaceTreeNotUniqueException | spaceName or NewSpaceName is a nonqualified space name and more than one instance of it exists in this tree. |
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.