Original Article Date: March 18, 2004
NTBang is an MDL application which provides a system command prompt for the execution of external programs. It is especially useful when attaching Engineering Links to elements to open external documents or to simply pop out to DOS to perform DOS commands.
In Pre-V8 MicroStation, the source code is delivered when you install the MDE Programming Tools. In addition, the source code for both MicroStation Pre-V8 and V8 can be found here http://microstation.bentley.com/files/motw/resources/utilities/V8MDLExamples.zip
If you're like me and have no clue how to compile an MDL, you can grab the compiled versions from the following links...look at the very bottom for the attachment. With a huge thank you to Barry Bentley for making these available!
NTBang for MicroStation pre-V8
NTBang for MicroStation V8
Now that you've got a copy of NTBang, you'll need to do a couple of housekeeping tasks:
Place the compiled version of NTBang in the ...\Program\MicroStation\mdlapps\ folder,
Add or set the configuration variable MS_CONSMODE = 1
And finally set MS_DGNAPPS to point to the NTBang MDL application.
MicroStation V7 - NTBang Keyins:
Once you've completed the above tasks, you'll be able to shell out to DOS and send DOS based keyins from MicroStation's keyin window. For example the following keyins and resulting actions can be expected in Pre-V8 versions of MicroStation.
To open the DOS window use one of these keyins:
To open the DOS window, run a command and automatically close the DOS window:
MicroStation V8 - NtBang Keyins:
For later versions of MicroStation, the results will be slightly different.
To shell out to your Windows folders:
DOS or dos
To shell out to the DOS window:
To shell out to DOS and run a DOS based command:
To open a file and lauch the application associated with the file format:
(MicroStation V8.5 - 2004 Edition and later)
Special Considerations for MicroStation pre-V8:
DOS can only handle file and folder names up to 8 characters which means you'll have to abbreviate long names with ~1:
If you're having trouble excecuting certain commands, test the command outside of MicroStation using the normal Windows command prompt.
In some situations, you may need to add Start to the beginning of the command line as follows:
!start winword d:\temp\My_Notes.doc
!start excel d:\temp\My_Data.xls
The keyins for NTBang and the results they produce may vary depending upon the version of your Windows operating system.
The keyins for NTBang and the results they produce may vary depending upon the version version of MicroStation you're running.
AskInga Article #188
You should not need NTBang for v8 it is already included - https://communities.bentley.com/products/microstation/w/microstation__wiki/2885/unleashing-the-power-of-the-desktop-within-microstation-v8-5-cs
For my job,I need to download the NTBang for microstation V8 file but when i try to click on the link, it's doesn't work... Is it possible to put another link?
thanks a lot.
I am looking to flatten all graphics in a file down to elevation 0. It looks like there may be code in the V8MDLExamples.zip file that will be very helpful. The link in this article is now a broken link. Can I still find this code somewhere.
TIA for your help.