Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAADriSetPrintArea.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2004
 ***********************************************************************
   Purpose     : This macro allows you to set the drafting print area
                 from the mouse selection, then to visualize it.
   Author      : TBU
   Languages   : VBScript
   Locales     : English
   CATIA Level : V5R14
 ***********************************************************************
 Retrieve the active document
 Test the document's type, if it is not a drawing document the macro stops
 Retrieve the active sheet of the document
 Retrieve the selection of the document
As Selection
 Clear the selection
 Define the object type allowed to be selected, here a drawing point
As Point 2D
 Retrieve the first point location to set the print area from the mouse selection
 Test of the selection content from the ObjectSelected value
 A drawing point has been selected
 Retrieve the drawing point object
 Retrieve the drawing point's view form the FindObject method of the selection
 Retrieve the drawing point's coordinates,
 these coordinates are defined from the view's reference axis
 Compute the drawing point's coordinates according to the sheet's reference axis
As Point2D
 Retrieve the second point location to set the print area from the mouse selection
 A drawing point has been selected
 Retrieve the drawing point object
 Retrieve the drawing point's view form the FindObject method of the selection
 Retrieve the drawing point's coordinates,
 these coordinates are defined from the view's reference axis
 Compute the drawing point's coordinates according to the sheet's reference axis
 Define the coordinates of the print area's point
 Define the width and height of the print area
 Define and activate the print area of the drawing document
 Run the "Visualize Print Area" command from its id, the sheet must be selected before !
 Compute the coordinates of a point in a view according to the sheet's reference axis
 Location, Angle and Scale factor of the view are take into account