(This article applies to MicroStation V8i)

In this tutorial, I'm going to demonstrate how to automate some common tasks in both Print Organizer and the single-Print dialog using print styles. This is intended primarily for CAD administrators.

I'm going to assume a relatively sophisticated workspace environment that makes use of a site-wide design library (site.dgnlib) and project-specific design libraries (projectA.dgnlib and projectB.dgnlib). You can follow along with this tutorial without using multiple projects if you prefer. I'll be assuming that the MS_DGNLIBLIST configuration variable is properly set to include all of the appropriate .dgnlib files referred to in this text, and that those .dgnlib files have already been created.

Below are the conditions of the printing workflow I'll be using. Some are realistic, others are contrived in order to demonstrate capabilities of print styles that are not available via other methods of printing automation.

• I produce paper output using a Windows printer named "HP DesignJet 1055CM by HP" via a customized printer.pltcfg printer driver configuration file. My Windows printer is configured to include Oversize forms in its published list of paper sizes.

• I produce PDF output via a customized pdf.pltcfg printer driver configuration file.

• For both printer.pltcfg and pdf.pltcfg, I only use two paper sizes: 'ANSI D' (full size) and 'ANSI B' (half size).

• Because my DesignJet is infested by gremlins, it prints everything upside down. When printing to my DesignJet, I need to rotate the output by 180 degrees to compensate. When printing to PDF, I want no rotation.

• I want all print output to be non-rasterized, maximized to the paper size, centered, line weights enabled, fill enabled, broken association symbology disabled, and points disabled.

• I have two projects: Project A and Project B. The prints for Project A need to be in color, the ones for Project B need to be in monochrome.

• Because I haven't yet realized all the wonderful benefits of using sheet definitions in MicroStation :-), my sheets consist of several boundaries in a single model in one design file for each project.

• For Project A, my sheet boundaries are defined by shape elements in the master model with color index 2 on level "Sheet".

• For Project B, my sheet boundaries are defined by the extents of various cells whose names all start with "Border". All the border cells are inside references.

Print styles are described in the product documentation under 'Working With Complete Designs / Printing / Print Styles'. I recommend reading at least the introduction to that chapter before trying to follow this tutorial. My hope is that this tutorial will make it easier to comprehend the intended purpose and usefulness of print styles.

Create the Default Site Print Style

The first step is to create a print style that is global to the entire site. I want the instructions in this print style to be applied every time I open the Print dialog or a create a print definition in Print Organizer, regardless of the project I'm working on.

Open site.dgnlib, select 'File / Print Organizer', then select 'Tools / Define Print Styles...'. In the 'Define Print Styles' dialog, select the New icon on the toolbar. Right-click on the default name of the newly created print style, "New Print Style", select Rename from the context menu, and rename the print style to "Site Defaults".

On the Main tab, change the Rasterized three-state toggle button to unchecked, set the "Size and scale" combo box to "Maximize", and set the Origin to Center.

Select the 'Default Print Style' icon on the toolbar. Note that the icon for this style in the Print Styles list changes, indicating this is a default print style. You may have any number of default print styles defined simultaneously.

The dialog should now look like this:

Switch to the Display tab, turn on line weights and fill, and turn off broken associations and points. This dialog should now look like this:



Select the 'Save' icon on the toolbar, then close the 'Define Print Styles' dialog.

Select File / Print to bring up the single-Print dialog. Note the message in Message Center stating "Default print style applied". If you examine the properties displayed in the Print dialog, you should find that Rasterized is turned off, the print size is maximized and centered, fill and line weights are enabled, and points and broken association symbology are disabled.

Create a Half-Size Print Style

With site.dgnlib still loaded, select 'Tools / Define Print Styles...' from Print Organizer to reopen the 'Define Print Styles' dialog.

Create a new print style and name it "Half Size". Do not make this print style a default print style. On the Main tab, set the Paper size combo box to 'ANSI B'. I might want to specify a different pen table here too, were I using pen tables in this demonstration. Instead, I'll later associate a scale factor for line widths to the ANSI B paper size in my customized printer driver configuration files.  Select the 'Save' icon on the toolbar.

Create the Printer Print Styles

Create a new print style and name it "HP DesignJet 1055CM". Do not make this print style a default print style. On the Main tab, set the Rotation field to 180. Set the Paper size combo box to 'ANSI D'. Select the 'Save' icon on the toolbar.

Create a new print style and name it "PDF". Do not make this print style a default print style. Set the Paper size combo box to 'ANSI D'. Select the 'Save' icon on the toolbar.

Close the 'Define Print Styles' dialog. Close Print Organizer.

Create customized printer_hp1055cm.pltcfg

In the single-Print dialog, select the standard printer.pltcfg printer driver configuration file. Then select 'File / Edit Printer Driver Configuration' to bring up the Printer Driver Configuration Editor.

Switch to the Paper Sizes tab. Select the 'Define paper sizes' button.

Note: If you are following along using a Windows printer driver other than the HP DesignJet 1055CM, you will need to use Windows form names that are appropriate for your printer driver.

Select the Add button. In the 'Edit Paper Size(s)' dialog, change the Paper size name to 'ANSI B', check the toggle button to the left of "Windows form name", set the Windows form name to "Oversize: ANSI B", and set the Overall paper size to 17 x 11 in. Set the Line weight scale to 0.5. Make sure the 'Is default paper size' toggle is unchecked. Select OK to return to the list of paper sizes.

Select the Add button. In the 'Edit Paper Size(s)' dialog, change the Paper size name to 'ANSI D', check the toggle button to the left of "Windows form name", set the Windows form name to "Oversize: ANSI D", and set the Overall paper size to 34 x 22 in. Set the Line weight scale to 0.5. Make sure the 'Is default paper size' toggle is unchecked. Select OK to return to the list of paper sizes.

For a discussion on custom paper sizes in printer.pltcfg, especially the importance of the Windows form name property, please refer to Paper Sizes in a Windows Printer Driver Configuration File.

Switch to the 'Base Properties' tab. Under the 'General' category, click in the edit field to the right of 'Print Style Name' and enter "HP DesignJet 1055CM" (do not include the quote marks). By doing this you are indicating that you wish this print style to be applied whenever this customized printer driver configuration file is selected.

Under the 'Windows Printer' category, click in the edit field to the right of 'Default Windows Printer Name' and enter "HP DesignJet 1055CM by HP" (do not include the quote marks).  Since we've defined custom paper sizes that refer to Windows form names, it's important to associate this .pltcfg file to a particular Windows printer.

Save the printer driver configuration as printer_hp1055cm.pltcfg.

Create customized pdf_custom.pltcfg

In the Printer Driver Configuration Editor, select File Open to open the standard pdf.pltcfg.

Switch to the Paper Sizes tab. Select the 'ANSI B' paper size and click "Edit...". Click the toggle button to the left of "Line weight scale" and change the line weight scale to 0.5. Select OK.   By doing this, you've instructed MicroStation to reduce the default line width in half whenever printing using this paper size.

Switch to the 'Base Properties' tab. Under the 'General' category, click in the edit field to the right of 'Print Style Name' and enter "PDF" (do not include the quote marks).

Save the printer driver configuration as pdf_custom.pltcfg.

Close the Printer Driver Configuration Editor. Close the single-Print dialog.

Select File / Print to reopen the single-Print dialog. Notice the "Default print style" message in Message Center. Select printer_hp1055cm.pltcfg. Notice the "Print style "HP DesignJet 1055CM" applied" message in Message Center. In the Print dialog, the Windows printer name should be "HP DesignJet 1055CM by HP". The paper size list should only consist of two paper sizes: ANSI B and ANSI D, with ANSI D selected. The initial print rotation should be 180 degrees, as specified in the print style.

Change the paper size to "ANSI B".  Note that the print rotation resets to zero, as a result of the Print dialog's normal automatic print layout behavior.  This demonstrates the nature of print styles.  They are one-time instructions used when the print definitions are created, when the printer driver configuration is changed, or when a print style is manually applied.  Print styles are not "sticky".  For example, if you have a default print style containing the Maximize and Center instructions, you may later change the print size and/or origin to one-off values if necessary.  The print style that was initially applied when the print definition was created wouldn't force the layout to remain maximized and centered forever after.

Select pdf_custom.pltcfg. Message Center should report "Print style "PDF" applied". The paper size should reset to "ANSI D", as specified in the PDF print style.

Close the single-Print dialog. Save and close site.dgnlib.

Create 'Project A' Print Style

My next steps are to define the instructions to locate the print boundaries. Since those instructions are different for each of my projects, and I want them to be applied automatically, I can't place them in my site design library.  I'll put them in project-specific design libraries instead. Also, I want to use a different print color mode in each project.

Using your Project A workspace, open projectA.dgnlib.

Select 'File / Print Organizer', then select 'Tools / Define Print Styles...'. In the 'Define Print Styles' dialog, select the New icon on the toolbar. Rename the print style to "Project Print Fence and Color". Select the "Default Print Style' icon to mark this print style as a default.

On the Advanced tab, change the Color option to "True Color".

On the Fence tab, select the "Define from shape..." link. Uncheck the 'Reference files' toggle button, leaving 'Master model' checked. Double-click the row under the Levels list box, and enter "Sheet" (without the quotes). In the Colors field, enter "2" (without the quotes). Select the "Create one print definition for each matching shape" radio button.

Select OK to return to the print style Fence tab. Select the 'Save' icon on the toolbar.

Close the 'Define Print Styles' dialog. Close Print Organizer. Save and close projectA.dgnlib.

Create 'Project B' Print Style

If you are not using multiple projects, you may skip this step. This 'Project B' print style is just intended to highlight the capability; the remainder of this tutorial will not refer to it.

Using your Project B workspace, open projectB.dgnlib.

Select 'File / Print Organizer', then select 'Tools / Define Print Styles...'. In the 'Define Print Styles' dialog, select the New icon on the toolbar. Rename the print style to "Project Print Fence and Color". Select the "Default Print Style' icon to mark this print style as a default.

On the Advanced tab, change the Color option to "Monochrome".

On the Fence tab, select the "Define from cell..." link. Uncheck the 'Master model' toggle button, leaving 'Reference files' checked. Double-click the row under the Cell names list box, and enter the regular expression "Border.*" (without the quotes). Select the "Create one print definition for each matching cell" radio button.

 

Select OK to return to the print style Fence tab. Select the 'Save' icon on the toolbar.

Close the 'Define Print Styles' dialog. Close Print Organizer. Save and close projectB.dgnlib.

Using the Print Styles in Print Organizer

Switch back to your Project A workspace and open projectA.dgn. In this tutorial, I'm assuming this design file contains three shapes on level 'Sheet' with color 2. Open Print Organizer.

Select 'File / Default Print Definition Name', and change the Expression name to '<print counter>-<design name>'.  Since we will be creating multiple print definitions from a single design file, we need to assign the print definitions unique names.

Select 'File / Printer Setup...' and change the Printer Driver Configuration File to pdf_custom.pltcfg.

Select 'File / Add Files to Set...' and add projectA.dgn. You can also drag-and-drop projectA.dgn into Print Organizer's main window.  In the 'Create Print Definitions' dialog, do not specify a print style name or any manually-specified options. We want this to be automatic.

Select OK. Print Organizer merges all the default print styles in the workspace (in our case, from site.dgnlib and projectA.dgnlib) and builds an internal composite print style. Among other instructions, this composite print style instructs Print Organizer to scan the design file and create a print definition for each shape boundary it finds meeting the specified criteria. The result is a print set consisting of three print definitions. Each print definition is non-rasterized, centered, and maximized to ANSI D as instructed by all the relevant print styles.

The initial order of the print definitions in the print set is the order in which the shapes were found in the design file.  This may not be the order in which you wish to print them.  Print Organizer allows you to rearrange the print definitions in the set, or change their properties on an individual basis, prior to printing.  The ability to do this is the most fundamental difference between Print Organizer and Batch Print.

Use the 'Edit / Select All' (or ctrl-A) to select all of the print definitions in the set. Select 'Tools / Apply Print Style...". Notice that all five of the print styles located in the workspace are displayed, along with which design library they are located in.

Select the 'Half Size' print style and select OK. Notice that all the paper sizes changed to 'ANSI B', as instructed by the print style. This is a demonstration of a manually-applied print style. If you wanted to, you could have also specified this print style at the time the design file(s) were added to the print set.



If you open the Properties dialog for each print definition, you'll see that the color mode and display attributes are set to their desired values.

Close Print Organizer.

Using the Print Styles in the Single-Print Dialog

Print styles may also be used to automate tasks in the single-Print dialog, including specification of the print border via element criteria. This is a significant new feature added in MicroStation 8.11.

The single-Print dialog, of course, cannot support multiple print definitions. When processing a print style that requests one print definition for each matching criteria, only the first found match is used.

In projectA.dgn, fit the view, then select File / Print to open the single-Print dialog. Note the message in Message Center stating that the default print style was applied. This actually indicates a composite print style was applied, one that was constructed from all the default print styles. Since we're in Project A, that composite print style included the print boundary shape criteria. Notice that the Print dialog's area mode is set to Fence, and the print preview indicates the first located boundary shape was used. The initial paper size is 'ANSI D'.

Select 'Settings / Apply Print Style'. A similar dialog to one used by Print Organizer is displayed, giving you a list of all of available print styles. Select 'Half Size' followed by 'OK'. The paper size changes to 'ANSI B'.

Change the area mode to 'View', and color mode to 'Grayscale'. The print preview should indicate that the print area encloses all of the boundary shapes visible in the view. Repeat 'Settings / Apply Print Style' , only this time select the 'Project Print Fence and Color' print style. Note that the color mode changes back to 'True Color', the print area back to Fence, and the print preview shows only the area enclosed the first found print boundary shape. The print scale did not change, as the Print dialog attempts to preserve the current print scale whenever possible. For this reason, you may wish to include either Maximize or an explicit print scale instruction in any of your print styles that change the print area.

The End

This demonstration just touches on the benefits print styles can bring to your workflow. I encourage you to look over the documentation and think of ways you can put them to good use.