Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAAPspPlacePart.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2007
 *****************************************************************************
   Purpose:      This sample illustrats the use of IDL interface
                 CATIAPspPlacePart



   Languages:    VBScript
   Locales:      English
   CATIA Level:  V5R17
 *****************************************************************************
 *****************************************************************************
--- Global variables
 *****************************************************************************
 *****************************************************************************
--- Support routines
 *****************************************************************************
 Show a trace output line.
Add message to output string for sending to message box at end of run.
Show message right away. May cause a lot of message boxes if used interactively.
CATIA header and lots of stuff is added to every MsgBox.
MsgBox iTraceOutput
 Print doesn't work in CATIA VB
Print iTraceOutput & vbCr
 Dump all traces.
 Get the ID of an object.
 Show the ID of an object.
 Empty list of doubles.
 Convert list of three doubles to string.
 Convert a four vector transform matrix to a string
 *****************************************************************************
--- Main routine
 *****************************************************************************
 -------------------------------------------------------------------------
 Setup the Environment
 -------------------------------------------------------------------------
 Open the Distributive system document
 Find the top node of the Distributive System object tree - .
 Get Application
-----------------------------------------------------------------------
 Get Data for Part Placement
-----------------------------------------------------------------------
 Get gObjListFactory
 Get root product children and parent product for placed part
 Get PspPhysicalProduct object
 Get object reference part and parent.
Just for info: got parent for part place above.
 Get logical line
-----------------------------------------------------------------------
 Place Part
-----------------------------------------------------------------------
 Up direction for part = (0,0,1)
Align vertical parallel to z-axis.
 Horizontal alignment for part = (1,0,0)
Align horizontal parallel to x-axis.
 Part position = (1000,2000,4000) (mm)
Position part at (1000, 2000, 3000)
-----------------------------------------------------------------------
 View and Test Part Data
-----------------------------------------------------------------------
 Placed part position
Set objPlacePartProduct = PlacePartRef
 Placed part connectors
 Dump messages.