CoordinateSpaceTree ChangeName Method Cognex VisionPro 9.10

Change the given space name to NewSpaceName.

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

public void ChangeName(
	string spaceName,
	string newSpaceName
)

Parameters

spaceName
Type: System String
A valid nonqualified or fully-qualified space name to change. This space must exist in this CoordinateSpaceTree.
newSpaceName
Type: System String
A valid nonqualified or fully-qualified space name for the new coordinate space.
Exceptions

ExceptionCondition
SpaceTreeExceptionnewSpaceName or spaceName is not a [valid space name].
SpaceTreeExceptionnewSpaceName is already the name of a child of spaceName 's parent space.
SpaceTreeExceptionspaceName is a nonqualified space name and more than one instance of it exists in this tree.
Remarks

NameChangedEvent Raised when a space name changes.

Remarks

Change the name of a space in this tree. If the given space name is a fully-qualified pathname, ChangeName modifies only the trailing nonqualified name. The new space name must meet the syntactical requirements of nonqualified or fully-qualified space names.

If you want to modify the root name, the RootName property permits less restrictive space names.

See Also