All Frameworks  Object Hierarchy  This Framework  Indexes   

Layout2DSheet (Object)

The interface to access a Layout2D Sheet.

Property Index

Orientation
Returns or sets the paper orientation.
PageSetup
Returns the page setup.
PaperHeight
Gets or Sets the paper width of the layout sheet.
PaperName
Returns or sets the paper format name.
PaperSize
Returns or sets the paper size.
PaperWidth
Gets or Sets the paper width of the layout sheet.
PrintArea
Returns the print area definition object.
ProjectionMethod
Returns or sets the sheet projection mode .
SheetScale
Returns or sets the scale of the Layout2D sheet.
Views
Returns the Layout2D view collection of the Layout2D sheet.
VisuIn3D
Set/Get the 3D visualization mode of the sheet in the 3D Viewer ie in the 3D windows and in the background of each view in every 2D context.

Method Index

Activate
Activates the Layout2D sheet.
IsDetail
Checks whether the sheet is a detail sheet.
PrintOut2
Prints the Layout2D sheet according to its page setup on the default printer.
PrintOut
Prints the Layout2D sheet according to its page setup on the default printer.
PrintToFile2
Prints the Layout2D sheet according its page setup in a file instead of being sent to a printer.
PrintToFile
Prints the Layout2D sheet according its page setup in a file instead of being sent to a printer.
reorder_Views
Changes the positions of the views in this sheet according to the given ordered list.

Properties


o Property Orientation() As
Returns or sets the paper orientation.
Example:
This example sets the paper orientation for the MySheet Layout2D sheet to catPaperLandscape.
 MySheet.Orientation = catPaperLandscape
 
o Property PageSetup() As (Read Only)
Returns the page setup.
Example:
This example returns the page setup for the MySheet Layout2D sheet.
 Dim MySheetPageSetup As DrawingPageSetup
 Set MySheetPageSetup = MySheet.PageSetup
 
o Property PaperHeight() As
Gets or Sets the paper width of the layout sheet.
Parameters:
oPaperHeight
Example:
This example get the height of the Layout2DSheet1.
 Layout2DSheet1.GetPaperHeight oPaperHeight
 
o Property PaperName() As
Returns or sets the paper format name.
Example:
This example sets the paper format name for the MySheet Layout2D sheet to DSFormat1.
 MySheet.PaperName = DSFormat1
 
o Property PaperSize() As
Returns or sets the paper size.
Example:
This example sets the page size for the MySheet Layout2D sheet to catPaperA4.
 MySheet.PaperSize = catPaperA4
 
o Property PaperWidth() As
Gets or Sets the paper width of the layout sheet.
Parameters:
oPaperWidth
Example:
This example get the width of the Sheet1.
 Sheet1.GetPaperWidth oPaperWidth
 
o Property PrintArea() As (Read Only)
Returns the print area definition object.
Example:
This example returns the print area for the MySheet Layout2D sheet 2DL.
 Dim MyPrintArea As PrintArea
 Set MyPrintArea = MySheet.PrintArea
 
o Property ProjectionMethod() As
Returns or sets the sheet projection mode .
Example:
This example sets the projection mode of the MySheet Layout2D sheet to catFirstAngle.
 MySheet.ProjectionMethod = catFirstAngle
 
o Property SheetScale() As
Returns or sets the scale of the Layout2D sheet.
Example:
This example sets the scale of the MySheet Layout2D sheet to 0.5.
 MySheet.SheetScale = 0.5
 
o Property Views() As (Read Only)
Returns the Layout2D view collection of the Layout2D sheet.
Example:
This example retrieves in ViewCollection the collection of views 2DL of the MySheet Layout2D sheet.
 Dim ViewCollection As Layout2DViews
 Set ViewCollection = MySheet.Views.
 
o Property VisuIn3D() As
Set/Get the 3D visualization mode of the sheet in the 3D Viewer ie in the 3D windows and in the background of each view in every 2D context.
See also:
CatVisuIn3DMode

Methods


o Sub Activate()
Activates the Layout2D sheet. Activating a Layout2D sheet means that this Layout2D sheet is the one on which the end user is now working. The window in the application's window collection which contains this Layout2D sheet becomes the active one.
Example:
This example activates the MySheet layout2dsheet.
 MySheet.Activate
 
o Func IsDetail() As
Checks whether the sheet is a detail sheet.
TRUE if the sheet is a detail sheet.
Example:
This example checks whether MySheet is a detail sheet.
 IsDetail = MySheet.IsDetail
 
o Sub PrintOut2()
Prints the Layout2D sheet according to its page setup on the default printer. If a rendering mode has been stored on the 2D Layout, it is used during print process for the backgrounds. Otherwise, "Shading with edges" rendering mode is used.
Example:
This example prints the Layout2DSheet1 on the default printer.
 Layout2DSheet1.PrintOut2
 
o Sub PrintOut( iRenderingMode)
Prints the Layout2D sheet according to its page setup on the default printer.
Parameters:
iRenderingMode
The rendering mode to use for the backgrounds of the views in the sheet.
Example:
This example prints the Layout2DSheet1 on the default printer.
 Layout2DSheet1.PrintOut catRenderShadingWithEdges
 
o Sub PrintToFile2( fileName)
Prints the Layout2D sheet according its page setup in a file instead of being sent to a printer. If a rendering mode has been stored on the 2D Layout, it is used during print process for the backgrounds. Otherwise, "Shading with edges" rendering mode is used.
Parameters:
fileName
The full pathname of the file receiving the data.
Example:
This example prints the Layout2DSheet1 in a file.
 Layout2DSheet1.PrintToFile2 "e:\temp\sheet1.prn"
 
o Sub PrintToFile( fileName,
iRenderingMode)
Prints the Layout2D 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.
iRenderingMode
The rendering mode to use for the backgrounds of the views in the sheet.
Example:
This example prints the Layout2DSheet1 in a file.
 Layout2DSheet1.PrintToFile "e:\temp\sheet1.prn",catRenderShadingWithEdges
 
o 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 drw =  CATIA.ActiveDocument.Part.GetItem("CATLayoutRoot")
 Set drwviewsorder = drwsheetsorder.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)
 

Copyright © 2003, Dassault Systèmes. All rights reserved.