Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAAKniRulesAndChecks.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2001
 ***********************************************************************
   Purpose:      This macro:
                 1 - Checks whether the active document is a CATPart
                 2 - Retrieves the Relations collection
                 3 - Creates the rule below
                      if PartBody\Hole.1\Diameter > 10mm
                      Message The hole diameter is PartBody\Hole.1\Diameter
                 4 - Creates the check below:
                      PartBody\Pad.1\FirstLimit\Length  > 100mm

   Assumptions:
                 This macro is intended to be run on the
                 KwrMacro0.CATPart document or any CATPart document
                 with the appropriate parameters (PartBody\Hole.1\Diameter
                 and PartBody\Pad.1\FirstLimit\Length)



   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
 Retrieve the collection object which contains
 all the document relations.
 The statements below are only valid when the active
 document is a CATPart
 Create the rule below:
           if PartBody\Hole.1\Diameter > 10mm
           Message The hole diameter is , PartBody\Hole.1\Diameter)
 Create the check below:
       PartBody\Pad.1\FirstLimit\Length  > 100mm
 Update the document