How do I print a design file to the windows default printer without user interaction from Windows fi


  
 Applies To 
  
 Product(s):MICROSTATION
 Version(s):N\A
 Environment: N\A
 Area: Print/Plot
 Subarea: N\A
 Original Author:Edwin Yepes, Bentley Technical Support Group
  

Problem

How do I print a design file to the windows default printer without user interaction from Windows file explorer. Example: right click on any design file and select print.
 

Solution

We need to do a couple of things:
1. Modify default Microstation dgn print command. You can do it from folder options or edit registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MicroStation DGN File\shell\print\command]@="C:\\Program Files\\Bentley\\Program\\MicroStation\\ustation.exe-print -SD:\\V8dgn\\123.txt \"%1\""

2. Create a keyin script file. Example file name:123.txt, it is contents: (only two lines)
print driver printer.plt; print execute
exit

Note: Notice I placed the 123.txt file in D:\V8dgn directory. You can put it anywhere, just make sure to give the correct path.

You should now be able to select the design file, right click and select "print:. The design file will be printed to the windows default driver or the printer specified inside of the plotter driver (.plt or .pltcfg) file.