Represents a drawing sheet of the drawing document.
The drawing sheet is included in a drawing document and contains
drawing views.
Warning: This interface is not available with 2D Layout for 3D Design.
Properties
Property GenViewsPosMode() As
Returns or sets the generative views position stability mode.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example sets the stability mode of the MySheet drawing sheet so that after an update,
existing and unmodified geometries don't move globally.
MySheet.GenViewsPosMode = catFixedAxis
Property Orientation() As
Returns or sets the paper orientation.
Example:
This example sets the paper orientation for the MySheet
drawing sheet to catPaperLandscape.
MySheet.Orientation = catPaperLandscape
Property PageSetup() As (Read Only)
Returns the page setup.
Example:
This example returns the page setup for the MySheet
drawing sheet.
Dim MySheetPageSetup As DrawingPageSetup
Set MySheetPageSetup = MySheet.PageSetup
Property PaperSize() As
Returns or sets the paper size.
Example:
This example sets the page size for the MySheet
drawing sheet to catPaperA4.
MySheet.PaperSize = catPaperA4
Property PrintArea() As (Read Only)
Returns the print area definition object.
Example:
This example returns the print area for the MySheet
drawing sheet.
Dim MyPrintArea As PrintArea
Set MyPrintArea = MySheet.PrintArea
Property ProjectionMethod() As
Returns or sets the sheet projection mode .
Example:
This example sets the projection mode of the MySheet drawing sheet to catFirstAngle.
MySheet.ProjectionMethod = catFirstAngle
Property Scale() As
Returns or sets the scale of the drawing sheet.
Example:
This example sets the scale of the MySheet drawing sheet to 0.5.
MySheet.Scale = 0.5
Property Scale2() As
Returns or sets the scale of the drawing sheet (Workaround for VBA keyword).
Example:
This example sets the scale of the MySheet drawing sheet to 0.5.
MySheet.Scale2 = 0.5
Property Views() As (Read Only)
Returns the drawing view collection of the drawing sheet.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example retrieves in ViewCollection the collection of
views of the MySheet drawing sheet.
Dim ViewCollection As DrawingViews
Set ViewCollection = MySheet.Views
Methods
Sub Activate()
Activates the drawing sheet.
Activating a drawing sheet means that this drawing sheet is the one on which
the end user is now working.
The window in the application's window collection which contains this
drawing sheet becomes the active one.
Example:
This example activates the MySheet drawing sheet.
MySheet.Activate
Sub ForceUpdate()
Forces the update of all the drawing views of the drawing sheet.
This update redraws all the views, whether their pointed objects have been
modified since the drawing sheet creation or last update or not.
These pointed objects can be CATIA Version 4 models, or
CATIA Version 5 parts or assemblies.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example forces the update of all the dawing views in the MySheet
drawing sheet.
MySheet.ForceUpdate
Sub GenerateDimensions()
Generates dimensions in all the drawing views of the drawing sheet.
These dimensions are generated from the constraints of the pointed 3D part(s).
One dimension only is generated for a given constraint.
Only dimensions for the following constraints are generated: distance,
length, angle, radius, and diameter.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example generates the dimensions for all the views in the MySheet
drawing sheet.
MySheet.GenerateDimensions
Func GetPaperHeight() As
Gets the paper width of the drawing sheet.
Parameters:
oPaperHeight
Example:
This example get the height of the DrawingSheet1.
DrawingSheet1.GetPaperHeight oPaperHeight
dd>
Func GetPaperWidth() As
Gets the paper width of the drawing sheet.
Parameters:
oPaperWidth
Example:
This example get the width of the DrawingSheet1.
DrawingSheet1.GetPaperWidth oPaperWidth
dd>
Func IsDetail() As
Checks whether the sheet is a detail sheet.
Warning: This method is not available with 2D Layout for 3D Design.
TRUE if the sheet is a detail sheet.
Example:
This example checks whether MySheet is a detail sheet.
IsDetail = MySheet.IsDetail
Sub Isolate()
Isolates the drawing sheet.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example isolates the MySheet drawing sheet.
MySheet.Isolate
Sub PrintOut()
Prints the drawing sheet according to its page setup on the default printer.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example prints the DrawingSheet1
on the default printer.
DrawingSheet1.PrintOut
Sub PrintToFile( fileName)
Prints the drawing sheet according its page setup
in a file instead of being sent to a printer.
Parameters:
fileName
The full pathname of the file receiving the data.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example prints the DrawingSheet1
in a file.
DrawingSheet1.PrintToFile "e:\temp\sheet1.prn"
dd>
Sub SetAsDetail()
Sets the sheet as a detail sheet.
You can now create views into this sheet that will be taken as details.
A detail is made to be reuse as dittos in views.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example changes the MySheet into a detail sheet.
MySheet.SetAsDetail
Sub SetPaperHeight( oPaperHeight)
Sets the paper width of the drawing sheet, avalaible on user format.
Updates the drawing views of the drawing sheet.
This update redraws all the views whose pointed objects have been modified
since the drawing sheet creation or last update, but do not redraw the views
whose pointed have not been modifed.
These pointed objects can be CATIA Version 4 models, or
CATIA Version 5 parts or assemblies.
Warning: This method is not available with 2D Layout for 3D Design.
Example:
This example updates the drawing views in the MySheet
drawing sheet.
MySheet.Update
Sub reorder_Views( iOrderedViews)
Changes the positions of the views in this sheet according to the given
ordered list.
iOrderedViews is the result of a permutation applied to
the list of all the views of this sheet with the following
constraint: the two first elements of the list must be
respectively the sheet's mainview and background view.
Example:
This example modifies the views order of a sheet made of
a mainview, a backgroundview and two user-created views.
(user-created views are inverted).
Set drwviewsorder = CATIA.ActiveDocument.Sheets.ActiveSheet
Set drwviews = drwviewsorder.Views
Set mainview = drwviews.item(1)
Set backview = drwviews.item(2)
Set view1 = drwviews.item(3)
Set view2 = drwviews.item(4)
newvieworder = Array(mainview, backview, view2, view1)
drwviewsorder.reorder_Views(newvieworder)