CoordinateSpaceTree VerifyChild Method Cognex VisionPro 9.21 SR1

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 optional FoundChildName argument.

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

public bool VerifyChild(
	string parentSpaceName,
	string childSpaceName,
	SpaceTreePathnameConstants 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.Vision SpaceTreePathnameConstants
A SpaceTreePathnameConstants 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 VerifyChild 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
ArgumentExceptionpathnameFormat value is not a member of SpaceTreePathnameConstants.
SpaceTreeExceptionparentSpaceName or childSpaceName value is not a legal space name.
SpaceTreeExceptionparentSpaceName or childSpaceName is a nonqualified space name and more than one instance of it exists 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. By default, a coordinate space is considered to be a child only 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 optional childrenOnly parameter to False.

See Also