This Client Server article is republished in its entirety from 2004 for reference purposes. It was written for MicroStation v8.5 and may not apply to any other version.
By Melissa Hook, Technical Support Analyst, Bentley Corporate Office
18 October 2004
With MicroStation V8.5 and higher, you can access all the power of your Windows desktop applications and batch routines from within MicroStation.
This ability can be accomplished by using the MicroStation key-in browser. The key-in command can be assigned to a MicroStation function key or toolbox icon for easier usage.
Note that some MicroStation users may have become accustomed to using MDL programs like NTBANG.MA or WINSTART.MA to start their Windows programs from within MicroStation. MicroStation V8.5 now includes SHELLEXECUTE.MA, which offers more options than either NTBANG or WINSTART.
Before we take a look at some examples, let's take a moment to examine the key-ins available in the SHELLEXECUTE application by performing the following steps:
From MicroStation, select Utilities>Key-in. Select the SHELLEXECUTE MDL application from the application list on the key-in browser (See Figure 1).
From the key-ins listed, it is important to note that there are currently three symbol key-ins available: "!," "%," and "%%." Each has three respective alternate keyword key-ins: "bang," "percent," and "percentpercent."
Each symbol key-in performs a slightly different operation:
Keyin | Alternate Keyin | Purpose |
! | bang | Used to open a command prompt and optionally to execute a system command or batch file from that command prompt |
% | percent | Used to enter a key-in in which a MicroStation configuration variable is embedded as a parameter |
%% | percentpercent | Used to temporarily run another Windows application. After you enter this key-in, you can return to the MicroStation application window only by exiting the other application |
$ | expand keyin | Used to enter a key-in in which a configuration variable is embedded as a parameter |
More advanced examples:
- Create a MicroStation debug report:
$ % $(MSDIR)ustation.exe -debug - Write a MicroStation environment variable to a text file:
$ ! echo $(_USTN_USERCFG) > c:\MicroStation_Variable.txt - Write a Microsoft environment variable to a text file:
$ ! echo $(USERNAME) > c:\Microsoft_Variable.txt - Open Explorer in same directory as the current file:
$ % explorer /e, /select, $(_DGNFILE) - Open a MicroStation debug report:
$ % Notepad "$(MSDIR)msdebug.txt" - Open the current file workspace config file:
$ % Notepad "$(_USTN_USERCFG)" - Open your favorite PowerPoint presentation:
%c:\myslideshow.ppt - Search the internet in your favorite browser:
%www.google.com - Open the remap .csv file:
$ % "$(MS_DATA)remaptemplate.xls"
Please note where spaces are being used between these key-in symbols.
If you find other useful or interesting key-ins, share them with other users by E-mailing them to the editor of the BE Newsletter. Your key-in may be included in the next User Tips section.
See Also
MicroStation Desktop TechNotes and FAQs
Comments or Corrections?
Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!