Barmenu
original development by
Bill Steinbock
(Amended by Philippe Halet: see the amendments at the end of the article)
Download Barmenu for MicroStation CONNECT Edition
BARMENU is an MDL application that allows non-programmers to create menu bars specific to your use. The menu file definition is contained in an ASCII text file. The default menu definition file is indicated by the variable BARMENU But maybe given as a parameter.

Barmenu for MicroStation CONNECT Edition
Download FREE
Send the link to:
An extract of an example menu file is presented below.
; Sample Menu | comments ignored
; menu title option 1
#Menu Title 1 | Menu Title
; menu title option 2
Title=Menu Title 2 | Menu Title
; mdl command to load as menu is activated
mdl l scale
mdl l pan
; now begin menu entries
Settings | Label on menu bar
{ | brace defines nest level
AA by 2Pt, "act ang pt2" | label, "keyin"
AA by 3Pt, "act ang pt3" | label, "keyin"
AS by Dist, "act scale dis" | label, "keyin"
Locks On | pulldown sub menu
{ | nest level incremented
Graphic Group, "Lock GG On" | label, "keyin"
Axis, "Lock Axis On" | label, "keyin"
-, | dividing line (must have comma)
Keypoint, "lock snap key" | label, "keyin"
Project, "lock snap proj" | label, "keyin"
Intersection, "lock snap inter" | label, "keyin"
} | nest level decremented
Locks Off | pulldown sub menu
{ | nest level incremented
Graphic Group, "Lock GG Off" |
Axis, "Lock Axis Off" |
Intersection, "lock snap inter off" |
} |
} | terminate Setting menu
| blank lines ignored
Setup |
{ |
Keyin Scale, "uc=scale" |
Arch Scale |
{ |
1/16, "uc=scale;16" | call ucm SCALE then keyin 16
1/8, "uc=scale;8" | call ucm SCALE then keyin 8
1/4, "uc=scale;4" | call ucm SCALE then keyin 4
} |
} | terminate Setup menu
Utilities | Label on Menu Bar
{ |
Plot Date | pulldown submenu
{ |
Place, "mdl l datstmp;place stamp" | load and execute MDL command
Update,"mdl l datstmp;update stamp" | load and execute MDL command
} |
AA=keyin, "m,erEnterAngle;t,aa=" | display prompt in error field
} | terminate Utilities menu
The parser that processes the lines of the definition file is very primitive and makes very little error check. It is the responsibility of the author of the menu definition file to check the appropriate syntax. The following rules must be followed to ensure success.
- Drop-down menu labels must be on a line without any further information.
- The hooks that designate the level of menu interlocking must be on a line without further information.
- Using a "-" label will result in a dividing line along the entire width of the drop-down menu. The "-" must be followed by a comma.
- Several seizures must be separated using a semicolon (i.e. "wt = 0; co = 0").
- When the commands are selected, the individual string keys are checked to see if they contain the "mdl l", which is supposed to be an MDL LOAD command. If this string is found, the program name is extracted. If the program is not currently loaded, it is loaded via an integrated MDL function.
Programme limitations
- Pulldown menus 60
- Chars per command string 130
- Command entries NOE
To run the program, insert the command into the keyboard input bar:

New in this version
In this version you can have:
- the possibility of anchoring the BARMENU (thanks to Steve Young for the first amendment);
- an additional drop-down menu containing a list of MDF files. When selecting a file from the drop-down menu [*.mdf], BARMENU is automatically updated and its window is automatically resized even if the window is anchored.
How can I have multiple MDF files in my barmenu?
- Copy all desired MDF files to the application directory;
- Add this directory to the variable MS_MDLAPPS;
- Enter the keyboard input:

This will allow you to move from one menu definition to another:



