CompositesServices (Object)

Represents CATIACompositesServices that allow to query composites entity.
Role: On any object recovers is it his a composites object or not and provides its type if yes.
Example:
This VBScript example illustrates how to GetCompositesType if any , on objects in CATIA Part.
 ' -------------------------------------------------------------------
 ' CATIA Composites 
 ' VBScript example to identify composites object type
 ' ------------------------------------------------------------------
 Sub CATMain()
    Const UNKNOWN       = 0 
    Const STACKING      = 1 
    Const PLYGROUP      = 2 
    Const SEQUENCE      = 3
    Const CUTPIECEGROUP = 4
    Const PLY           = 5
    Const CORE          = 6
    Const CUTPIECE      = 7
    ' Part 
    Set myPart = CATIA.ActiveDocument.Part
 
    ' Get Service Object by querying on part - extension of CATIA Base 
    Set myCompServObj = myPart.GetItem("CATCompositesServices")
    
    ' Hybrid Bodies
    Set myHBodies = myPart.HybridBodies
    
    ' Get Part Hybrid Bodies Count
    HBCount = myHBodies.Count
   
    StckCnt = 0
    For N = 1 To PartHBCount
       ' Iterate through all Hybrid Bodies in Part one by one and retrieve its type
         Set myObject = myHBodies.Item(N)
         myCompServObj.GetCompositesType myObject, myType
         If myType = STACKING Then
    		     ' ==> Stacking Composites feature type is recovered  among hybridshapes under part 
    		    ObjCompositesStacking =  myObject
    		    ' ....
    		Exit For 
    	End if 
    Next 
    Mggbox "Stacking="& ObjCompositesStacking.Name 
 End Sub
 

Methods


Sub GetCompositesType( iObject, oCompositesType)
Retrieves "Composites Type" of an 3D object.
Parameters:
iObject
Object whose type is to be retrieved.
oCompositesType
Composites Type of input object.
See also: