Cog3DCoordinateSpaceTree VerifyChild Method Cognex VisionPro 9.8
Return true if the given childSpaceName is a direct or indirect child of parentSpaceName. Otherwise, return false. The formatted child name, or "", can be obtained through the foundChildName output argument.

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

public bool VerifyChild(
	string parentSpaceName,
	string childSpaceName,
	CogSpaceTreePathnameConstants pathnameFormat,
	bool childrenOnly,
	out string foundChildName
)

Parameters

parentSpaceName
Type: System String

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

childSpaceName
Type: System String

A valid nonqualified or fully-qualified name that indicates the child space to verify.

pathnameFormat
Type: Cognex.VisionPro CogSpaceTreePathnameConstants

A CogSpaceTreePathnameConstants value that indicates how the returned name should be formatted.

childrenOnly
Type: System Boolean

If false, the parent space is considered a valid descendant of itself, which allows you to find space names that are at or descended from the given parent space name. If true, the parent space is not a valid descendant of itself.

foundChildName
Type: System String 

If this method returns true, foundChildName contains the formatted child space name. Otherwise, it contains "".

Return Value

Type: Boolean

True if the given childSpaceName is a descendant of parentSpaceName; otherwise, false.

Exceptions

ExceptionCondition
ArgumentOutOfRangeException

The pathnameFormat value is not a member of CogSpaceTreePathnameConstants.

CogSpaceTreeInvalidNameSyntaxException

parentSpaceName or childSpaceName is not a legal space name.

CogSpaceTreeNameNotUniqueException

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

CogSpaceTreeNameNotInTreeException

parentSpaceName or childSpaceName does not exist in this tree.

Remarks

Returns true if the given childSpaceName is a descendant of parentSpaceName. Otherwise, returns false. Both spaces must exist in the tree.

If childrenOnly is true a coordinate space will only be considered as child if it is a descendant of the given parent space. In some applications, however, you may need to test whether a space is a descendant of the given parent or is the parent space itself. To do this, set the childrenOnly parameter to false.

See Also