Properties
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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.
- 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:
Methods
- 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
- 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
- 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
- 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
- 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. dd>
- 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
- 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"
- 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)