This object is available thanks to Set myPart = CATIA.ActiveDocument.Part ' Get Service Object by querying on part - extension of CATIA Base Set partServices = myPart.GetItem("CATPartServices")
- Example:
Set part1 = CATIA.ActiveDocument.Part Set partServices1 = myPart.GetItem("CATPartServices")
Methods
- Func GetNearSubElements( iObject, iSubElementDimension, iNearObject) As
-
Get the sub elements of a geometric object or a body that are the closest to a geometric object or a body.
- Parameters:
-
- iObject
- A geometric object or a body dd>
- iSubElementDimension
- The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 for face. dd>
- iNearObject
- A geometric object or a body to be close to dd>
- oSubElements
- List of the sub elements of iObject (without duplicates) closest to iNearObject.
- Example:
- The following example returns the vertices of a pad that are the closest to a point.
Set part1 = CATIA.ActiveDocument.Part Set bodies1 = part1.Bodies Set body1 = bodies1.Item("PartBody") Set shapes1 = body1.Shapes Set pad1 = shapes1.Item("Pad.1") Set point1 = shapes1.Item("Point.1") Set partServices1 = myPart.GetItem("CATPartServices") Set references1 = partServices1.GetSubNearElements(pad1, 0, point1)
- Func GetSubElements( iObject, iSubElementDimension, iDuplicates) As
-
Get the sub elements of a geometric object or a body.
- Parameters:
-
- iObject
- A geometric object or a body dd>
- iSubElementDimension
- The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 for face. dd>
- iDuplicates
- Allow duplicate sub elements in the list. FALSE will remove duplicates (same label and selecting feature). dd>
- oSubElements
- List of the sub elements
- Example:
- The following example returns the vertices of a pad
Set part1 = CATIA.ActiveDocument.Part Set bodies1 = part1.Bodies Set body1 = bodies1.Item("PartBody") Set shapes1 = body1.Shapes Set pad1 = shapes1.Item("Pad.1") Set partServices1 = myPart.GetItem("CATPartServices") Set references1 = partServices1.GetSubElements(pad1, 0, True)