PartServices (Object)

The object exposes services for the part.

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
iSubElementDimension
The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 for face.
iNearObject
A geometric object or a body to be close to
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
iSubElementDimension
The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 for face.
iDuplicates
Allow duplicate sub elements in the list. FALSE will remove duplicates (same label and selecting feature).
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)