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 to place string parts.



   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.
 Empty list of objects.
 Convert list of three doubles to string.
 Convert a four vector transform matrix to a string
 Get application
 Get PspPhysicalProduct object
 Get the logical line that is a child of the input product
 Get reference part given instance.
 Find a product.
ShowTraceOutputLine "Child product name = " & Prod.Name
 Show point position
 Show product info
 Placed part connectors
 *****************************************************************************
--- Main routine
 *****************************************************************************
 -------------------------------------------------------------------------
 Setup the Environment
 -------------------------------------------------------------------------
 Open the Distributive system document
 Find the top node of the Distributive System object tree - .
 Get Plant-ship modeler workbench
 -------------------------------------------------------------------------
 Setup application data
 -------------------------------------------------------------------------
 Get tubing application
 Get piping application
 Get gListFactory
-----------------------------------------------------------------------
 Get part parent products.
-----------------------------------------------------------------------
 Get root product children and parent products for placed part
 -------------------------------------------------------------------------
 Add parts to hold points
 Parts created under placement part parent because points are interpretted as relative to that parent.
 -------------------------------------------------------------------------
-----------------------------------------------------------------------
 Define some part placement variables
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------
 Place Tube
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Null string uses name generated by PP engine
 Up direction for part = (0,0,1)
Align vertical parallel to z-axis.
 Create points
Bend radius in mm (1in).
-----------------------------------------------------------------------
 View and Test Part Data
-----------------------------------------------------------------------
 Placed part position
-----------------------------------------------------------------------
-----------------------------------------------------------------------
 Place Tube with bends
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Null string uses name generated by PP engine
 Up direction for part = (0,0,1)
Align vertical parallel to z-axis.
 Create points
Bend radius in mm (1in).
-----------------------------------------------------------------------
 View and Test Part Data
-----------------------------------------------------------------------
 Placed part position
Set objPlacePartProduct = PlacePartRef
-----------------------------------------------------------------------
-----------------------------------------------------------------------
 Place Pipe
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Null string uses name generated by PP engine
 Up direction for part = (0,0,1)
Align vertical parallel to z-axis.
 Create points
Bend radius in mm (2in).
-----------------------------------------------------------------------
 View and Test Part Data
-----------------------------------------------------------------------
 Placed part position
Set objPlacePartProduct = PlacePartRef
-----------------------------------------------------------------------
-----------------------------------------------------------------------
 Place Pipe with bends
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Null string uses name generated by PP engine
 Up direction for part = (0,0,1)
Align vertical parallel to z-axis.
 Create points
Bend radius in mm (2in).
-----------------------------------------------------------------------
 View and Test Part Data
-----------------------------------------------------------------------
 Placed part position
Set objPlacePartProduct = PlacePartRef
-----------------------------------------------------------------------
 Clean up model
-----------------------------------------------------------------------
 Remove part that holds points
 Dump messages.