Hide Table of Contents
SetPageSetupOptions Method (IEModelViewControl)

Sets the Page Setup parameters for printing.

.NET Syntax

Visual Basic (Declaration) 
Sub SetPageSetupOptions( _
   ByVal Orientation As EMVPrintOrientation, _
   ByVal PaperSize As Integer, _
   ByVal PaperLength As Integer, _
   ByVal PaperWidth As Integer, _
   ByVal Copies As Integer, _
   ByVal Source As Integer, _
   ByVal Printer As String, _
   ByVal TopMargin As Integer, _
   ByVal BottomMargin As Integer, _
   ByVal LeftMargin As Integer, _
   ByVal RightMargin As Integer _
) 
Visual Basic (Usage) 
Dim instance As IEModelViewControl
Dim Orientation As EMVPrintOrientation
Dim PaperSize As Integer
Dim PaperLength As Integer
Dim PaperWidth As Integer
Dim Copies As Integer
Dim Source As Integer
Dim Printer As String
Dim TopMargin As Integer
Dim BottomMargin As Integer
Dim LeftMargin As Integer
Dim RightMargin As Integer
 
instance.SetPageSetupOptions(Orientation, PaperSize, PaperLength, PaperWidth, Copies, Source, Printer, TopMargin, BottomMargin, LeftMargin, RightMargin)
C# 
void SetPageSetupOptions( 
   EMVPrintOrientation Orientation,
   int PaperSize,
   int PaperLength,
   int PaperWidth,
   int Copies,
   int Source,
   string Printer,
   int TopMargin,
   int BottomMargin,
   int LeftMargin,
   int RightMargin
)
C++/CLI 
void SetPageSetupOptions( 
&   EMVPrintOrientation Orientation,
&   int PaperSize,
&   int PaperLength,
&   int PaperWidth,
&   int Copies,
&   int Source,
&   String^ Printer,
&   int TopMargin,
&   int BottomMargin,
&   int LeftMargin,
&   int RightMargin
) 

Parameters

Orientation
Page orientation as defined in EMVPrintOrientation
PaperSize
Use Windows printer constants (see Remarks)
PaperLength
Custom size in thousandths of an inch, if you are not using a standard paper size
PaperWidth

Custom size in thousandths of an inch

Copies

Number of copies

Source

Paper tray source; use Windows printer constants

Printer

Printer name

TopMargin

Top margin in thousandths of an inch or 0 to use printer's margin

BottomMargin

Bottom margin in thousandths of an inch or 0 to use printer's margin

LeftMargin

Left margin in thousandths of an inch or 0 to use printer's margin

RightMargin

Right margin in thousandths of an inch or 0 to use printer's margin

Remarks

Call this method before calling IEModelViewControl::Print5.

 

You can find a list of Windows printer constants in wingdi.h or in the .NET enumerations Printing.PaperKind or Printing.PaperSource. Some common settings include:

  • Paper Size

    • Letter (letter 8 1/2 x 11 in) = 1  

    • C-sheet (C size sheet = 24  

    • D-sheet (D size sheet) = 25                       

    • E-sheet (E size sheet) = 26                    

  •  Paper Source (paper tray)

    • Upper tray = 1

    • Lower tray = 2

    • Middle tray =3

    • Manual = 4

    • Auto (recommended default) = 7

 

See Also

Availability

SolidWorks eDrawings API 2005 SP0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SetPageSetupOptions Method (IEModelViewControl)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2012 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.