Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAAKniDesignTable.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2001
 ***********************************************************************
   Purpose:      This macro:
                 1 - Checks whether the active document is a CATPart
                 2 - Checks whether the xls file containing the design table
                     exists
                 3 - Creates a design table from an existing Excel file
                 4 - Creates two associations
                 5 - Applies a new configuration to the document
                 6 - Add a new row to the design table

   Assumptions:  This macro only operates on Windows NT
                 This macro is intended to be run on the
                 KwrMacro0.CATPart document.
                 This macro uses as an input data the KwrMacTable.xls file
                 You must replace the value of the sFolderPath variable with the path
                 of the file where this Excel table has been downloaded.



   Author:       Carole ROULLE , Pierre Grignon
   Languages:    VBScript
   Locales:      English (United States)
   CATIA Level:  V5R6
   Revision : V5R13
 ***********************************************************************
 -----------------------------------------------------------
 Optional: allows to find the sample wherever it's installed
 -----------------------------------------------------------
 Open the Part document
 Set the CATIA popup file alerts to False
 It prevents to stop the macro at each alert during its execution
 Retrieve your active document - CATIA is your application
 You get the active document by using the ActiveDocument property
 on your application object
 Check whether the document is a CATPart
 InStr is a standard VB function
 Set the file system object containing the folder
 Define the design table path
 Test whether the design table file exists
 if it does not exist a message box is displayed
 if it exists the design table is created in the document
 Retrieve the collection object which contains
 all the document relations.
 The statements below are only valid when the active
 document is a CATPart
 Just to be clean before creating relations
 Scan the collection of relations and remove the relations
 with name "DesignTable.1"
 Create the "DesignTable.1" design table
 by using the Relations.CreateDesignTable method
 Argument 1: Design table name
 Argument 2: Comment (empty here below)
 Argument 3: Allows you to specify whether you want to copy the
             design table data in the document or not. Set this argument
             to True whenever you work on a platform (NT/Unix)
             and intend to reuse your document on another platform
             (Unix/NT). Otherwise, set this argument to False
 Argument 4: design table path
 Retrieve the collection object which contains
 all the part bodies
 Scan the Bodies collection to determine
 whether a PartBody feature exists
 if the PartBody exists - creates two associations
 Retrieve the "PartBody" item from the Bodies collection
 Check there is at least one shape in the Part
 Retrieve the Pad.1 object
 Creates two associations
 Apply the third configuration of the design table
 to your document
 Add a new row
 A new row is added to the design table each time the
 macro is replayed on the document
 A limit of 10 rows is specified
 Update the document