Overview
When the print dialog is invoked or updated from a model containing a valid sheet definition, certain fields are automatically set using information obtained from the model.
- The print area mode is set to "sheet".
- An internal fence is defined for the design boundary. This boundary is depicted in the MicroStation view using either a dashed or shadowed rectangle. Geometry outside this internal fence is not plotted. Note that any margins specified in the sheet definition (from sheetsizes.def) and depicted in the view are unrelated to printer hardware margins. In the event the sheet margins and the printer hardware margins do not match, the larger margins are used.
- If specified and configured to do so, the print dialog .plt file and Windows printer name are obtained from the sheet definition. If the printer is not specified in the sheet or the default configuration is being used, the normal default printer is selected.
- If specified, the print dialog units are set to the sheet units. Typically, these units are obtained from sheetsizes.def when the sheet size name is selected.
- If specified, the printer paper size name that corresponds to the sheet size is selected.
- If specified, the print scale is set from the sheet annotation scale.
If the sheet size name is "CUSTOM", the print dialog cannot determine the proper paper layout automatically. In that case, the print area mode is set to "sheet" and the internal fence is defined, but the print dialog units, paper size, and scale are not set from the sheet definition. Instead, the print area is maximized to the default paper size.
For non-CUSTOM sheet sizes, the print scale is calculated by converting the sheet units and annotation scale into a master-units-per-printer-unit ratio. If you change the master units for your model after setting up the sheet definition, the print scale may be calculated incorrectly. In the event you have problems with the print dialog after changing your master units for a sheet model, go into the model properties dialog and reset the sheet size name. It may be necessary to change the name to something else, then change it back to the original setting.
Automatic Paper Size Selection
The logic the print dialog uses to select the printer paper size works as follows:
- If a default paper size is defined, that paper size is always chosen. The default paper size may be specified using the /default qualifier on a .plt size record, the /form qualifier on the sysprinter record, or the MS_PLT_SYSPRT_DEFAULT_FORM configuration variable.
- Otherwise, if there is a complete, case-insensitive name match between the sheet size and a paper size supported by the selected printer driver, that paper size is chosen.
- Otherwise, if there is a supported paper size name that begins with the entire sheet size name, that paper size is chosen. For example, "ANSI A" sheet size name maps to "ANSI A 8 1/2 x 11 IN." printer paper size name.
- Otherwise, there is no name match. In that case, the "best fit" paper size name is selected based on the calculated print size.
"Best fit" paper size name selection works as follows: all the paper sizes supported by the selected printer are scanned. Only the ones whose total size is equal to or greater than the print size are considered. Of that group, the smallest form is chosen.
With system printers, the logic is a little more involved. Two passes are made over the sizes supported by the Windows printer driver. On the first pass, only recognized standard sizes appropriate for the given print units are considered. For English units, the standard sizes are ANSI A through ANSI F, and Arch A through Arch F. For metric units, the standard sizes are ISO A0 through A4. If a standard form that is equal to or greater than the print size is found, the closest match is chosen. If no standard form that encompasses the print size is found, a second pass is made through the printer paper sizes in which all sizes are considered.
By default, printable area is not considered when selecting a system printer paper size. Thus, if the sheet size is "ANSI C", the printer paper size "ANSI C 22 x 17 IN." may be selected even though the corresponding printable area is less than 22 x 17 inches. Some printer drivers support Oversize or Extra paper sizes that you may prefer to use. To prevent the print dialog from automatically selecting a paper size whose printable area is less than the print size, you can add the /selectFormNoClip qualifier to the sysprinter record in the .plt file. Note that this may degrade performance, as it takes longer to obtain printable area than total area for each supported paper size. A better method in this case is to avoid "best fit" paper size selection entirely by specifying the actual printer paper size name in the sheet definition. See MS_USECUSTOMSHEETSIZEDEF=2.
In the event a printer paper size that fits the print size cannot be found, the print area is maximized to the default paper size.
Sheet Definition Paper Sizes versus Printer Paper Sizes
The sheet sizes in sheetsizes.def are intended to facilitate creating generic, standard sheet definitions in models that don't tie the design to a particular printer driver. The cut sheet sizes have generic margins that are likely to be larger than actual hardware margins, and can be used to ensure consistent clipping across different devices. Thus, sheet definitions containing sheet size names from sheetsizes.def are highly portable from one environment to another.
If you care more about convenience than portability, and would like the sheet definition to contain an accurate representation of the hardware margins using the real printer paper size name, you may want to set MS_USECUSTOMSHEETSIZEDEF=2. This instructs the model properties dialog to include the paper sizes supported by the active printer (the print dialog needs to be up at the same time) in its sheet size combo box. Going this route removes all guesswork in the print dialog when selecting the paper size, as long as the printer driver does not change. If you do change printer drivers, and the sheet size name is not valid for the new printer, the "best fit" paper size is chosen and the larger of the sheet margins and printer margins are used.
Saving Print Dialog Settings Back to the Model
If desired, you may save the active print dialog printer and layout settings back to the sheet definition. This is accomplished via the key-in command "print savesheetdef". After prompting for confirmation, this command saves the current .plt base filename, Windows printer name, paper size name, print units, and print scale to the model. You might not want to do this if you intend to distribute your sheet models to sites with different printing environments. However, if you set up sheet models using a number of different printers and paper size settings, and portability is not an issue, you may find it convenient to have the print dialog automatically pick up these settings when invoked.
Configuration Variables
There are three primary configuration variables that control sheet support in the print dialog:
The MS_PLT_HONOR_SHEET_INFO variable can be used to prevent the print dialog from applying sheet attributes stored in the model when it creates a plot description. Normally, if a sheet definition is present, the print dialog defaults to sheet area mode and the design boundary is set automatically from the sheet. If this variable is set to "0", the print dialog acts as if there is no sheet definition present.
If MS_PLT_SET_LAYOUT_FROM_SHEET is set to "0", the print dialog layout is not automatically set when a sheet definition is loaded (and the current print mode is sheet). That is, the printer driver, print units, paper size, and print scale in the sheet definition are ignored, but the print area is still obtained from the sheet rectangle and maximized to the default paper size.
If MS_PLT_SET_PRINTER_FROM_SHEET is set to "1", the default print dialog printer is taken from the active sheet definition (if present). By default, any .plt file and Windows printer name settings in the sheet definition are ignored.
8334