Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAASchPlaceComponent.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2004
 *****************************************************************************
   Purpose:      Schematic component placement in free space and connected to
                 existing component.
   Languages:    VBScript
   Locales:      English
   CATIA Level:  V5R15
 *****************************************************************************
 -------------------------------------------------------------------------
 Optional: allows to find the sample wherever it's installed
 -------------------------------------------------------------------------
 Open the schematic document
 Open main schematic P&ID design document (for new component instances created here)

 Find the top node of the schematic object tree - schematic root.
--------------------------------------------------------------------------
 Component instance (to be created below) orientation matrix.
 x-axis = (1.0,0.0)
 y-axis = (0.0,1.0)
 origin = (100.0,300.0)
--------------------------------------------------------------------------
-----------------------------------------------------------------------
 Get the first symbol from component catalog.
-----------------------------------------------------------------------
---------------------------------------------------------------------
 Get the owner of the first symbol. That is a reference component
 in the catalog.
---------------------------------------------------------------------
-------------------------------------------------------------------
 Place an instance of the catalog reference in an empty space in
 the design document
 Note that the target document is an input to PlaceInSpace
-------------------------------------------------------------------
-----------------------------------------------------------------------
 Get another symbol from component catalog.
-----------------------------------------------------------------------
---------------------------------------------------------------------
 Get the owner of the second symbol. That is a reference component
 in the catalog.
---------------------------------------------------------------------
-------------------------------------------------------------------
 Place an instance of the second reference connecting it to the
 first one. That is to "place" a new instance B connecting to
 the existing instance A.
-------------------------------------------------------------------
-------------------------------------------------------------------
  Preparing to place B on A.
  1- need to retreive a CATIASchCompatibility interface handle
     from the existing instance (objSchCompInstA), the one we have
     just placed in empty space.
  2- need to retreive the graphical image (symbol instance) of
     objSchCompInstA. This is needed for the compatibility
     checking.
     For this we need another interface handle: CATIASchCompGraphic
-------------------------------------------------------------------
----------------------------------------------------------------
  1- QueryConnectAbility.
     Ask the reference of the new instance B for information
     to use in compatibility checking. The objCompRefPlaceInfo
     is an output and should be used as a "black box".
     It is the input to the next call.

  2- IsTargetOKForPlace
     Check whether A is compatible to B in making a connection.
     A is the first instance, it is the "target".
     objCompatInfo is an output and should be used as
     a "black box". It is an input to the next call.

  3- GetBestFitPlaceInfo
     Input the placement location, close to the x-y location of
     the connector of objSchCompInstA (A) that you want to connect
     B to.
     objFinalPlaceInfo is an output and should be used as
     a "black box". It is an input to the next call.

  4- PlaceOnComponentWithInfo
     Place a new instance with the black box info.

----------------------------------------------------------------
 -- step 1
 -- step 2
-- 6.50 is the relative x coordinate of the right connector
-- from the symbol origin
 -- step 3
 -- step 4
----If ( Not ( objSchCompatInstA Is Nothing )...
---- If ( Not ( objSchCntblCVRef Is Nothing )...
---- If ( Not ( objSchGRRCVCtlg Is Nothing )...
----If ( Not ( objSchRoot Is Nothing )...
 -----------------------------------------------------------------------------
 | Find the first symbol used for the input schematic component.
 | Input: objSchCompGraphArg:  the schematic component
 |        (a CATIASchCompGraphic interface handle).
 | Returns: the component image (the symbol instance)
 -----------------------------------------------------------------------------