Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
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 VerifyChild(String, String, CogSpaceTreePathnameConstants, Boolean, String ) returns True, foundChildName contains the formatted child space name. Otherwise, it contains "".
Return Value
Type: BooleanTrue if the given childSpaceName is a descendant of parentSpaceName; otherwise, False.
| Exception | Condition |
|---|---|
| ArgumentException | pathnameFormat value is not a member of CogSpaceTreePathnameConstants. |
| CogSpaceTreeInvalidNameSyntaxException | parentSpaceName or childSpaceName value is not a legal space name. |
| CogSpaceTreeNotUniqueException | parentSpaceName or childSpaceName is a nonqualified space name and more than one instance of it exists in this tree. |
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.