Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 69.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 this method 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 |
|---|---|
| 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. |
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.