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 System.Integer, _
   ByVal PaperLength As System.Integer, _
   ByVal PaperWidth As System.Integer, _
   ByVal Copies As System.Integer, _
   ByVal Source As System.Integer, _
   ByVal Printer As System.String, _
   ByVal TopMargin As System.Integer, _
   ByVal BottomMargin As System.Integer, _
   ByVal LeftMargin As System.Integer, _
   ByVal RightMargin As System.Integer _
) 
Visual Basic (Usage) 
Dim instance As IEModelViewControl
Dim Orientation As EMVPrintOrientation
Dim PaperSize As System.Integer
Dim PaperLength As System.Integer
Dim PaperWidth As System.Integer
Dim Copies As System.Integer
Dim Source As System.Integer
Dim Printer As System.String
Dim TopMargin As System.Integer
Dim BottomMargin As System.Integer
Dim LeftMargin As System.Integer
Dim RightMargin As System.Integer
 
instance.SetPageSetupOptions(Orientation, PaperSize, PaperLength, PaperWidth, Copies, Source, Printer, TopMargin, BottomMargin, LeftMargin, RightMargin)
C# 
void SetPageSetupOptions( 
   EMVPrintOrientation Orientation,
   System.int PaperSize,
   System.int PaperLength,
   System.int PaperWidth,
   System.int Copies,
   System.int Source,
   System.string Printer,
   System.int TopMargin,
   System.int BottomMargin,
   System.int LeftMargin,
   System.int RightMargin
)
C++/CLI 
void SetPageSetupOptions( 
&   EMVPrintOrientation Orientation,
&   System.int PaperSize,
&   System.int PaperLength,
&   System.int PaperWidth,
&   System.int Copies,
&   System.int Source,
&   System.String^ Printer,
&   System.int TopMargin,
&   System.int BottomMargin,
&   System.int LeftMargin,
&   System.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

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) 2017 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.