Cog3DCoordinateSpaceTree AddSpace Method Cognex VisionPro 9.5
Add a new coordinate space, with the given name and transform, to this tree. Attach it to the specified pre-existing parent space.

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

public void AddSpace(
	string parentSpaceName,
	string newSpaceName,
	ICog3DTransform parentFromNew,
	CogAddSpaceConstants duplicateHandling
)

Parameters

parentSpaceName
Type: System String

A valid nonqualified or fully-qualified space name that indicates the parent space.

newSpaceName
Type: System String

A valid nonqualified space name for the new coordinate space.

parentFromNew
Type: Cognex.VisionPro3D ICog3DTransform

A 3D transform that maps points from the space you are adding to the parent coordinate space.

duplicateHandling
Type: Cognex.VisionPro CogAddSpaceConstants

A CogAddSpaceConstants value that specifies what do if the parent coordinate space already contains an immediate child with the same name as newSpaceName. The options are to return an error, replace the transform of the named child, or do nothing.

Events

Exceptions

ExceptionCondition
ArgumentNullException

parentFromNew is null.

ArgumentOutOfRangeException

The duplicateHandling value is not a member of CogAddSpaceConstants.

CogSpaceTreeDuplicateChildNameException

newSpaceName is already a child of parentSpaceName and the duplicateHandling argument is DuplicateIsError .

CogSpaceTreeInvalidNameSyntaxException

parentSpaceName or newSpaceName is not a legal space name.

CogSpaceTreeNameNotUniqueException

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

CogSpaceTreeNameNotInTreeException

parentSpaceName does not exist in this tree.

Remarks

Adds a new user coordinate space to this tree. You must specify the name of the parent space for the newly added space, and supply a transformation that defines the relationship between the parent space and the new space.

See Also