You are currently reviewing an older revision of this page.
Original Article Date: March 5, 2001
Ever hear of a barmenu? How 'bout a menubar? Well, besides being able to order munchies to eat with your beer, they can also help you set up and maintain your corporate drafting standards!
Many thanks to Mr. Sean Forward for authoring this article! Next to the ‘Settings Manager', Barmenus are the most powerful customisation tool you can have at the click of a mouse. The beauty of the barmenu is that they are easily linked to text files (mdf files) which enable you to create standardised menus for everything. This includes things like discipline-specific level allocations, applying project specific title blocks and loading commonly used mdl's and macros. The limits are endless! What we are going to look at over the next series of articles is how to set up your first barmenu, link it to an mdf text file and learn to fly from there! To get started, we'll walk you through the very basics of barmenu building - we'll take a look at creating the menu below with the CIVIL item and associated picklicks!
How does a Barmenu Work To be able to use a barmenu, you need two files. The first one is barmenu.ma which can be downloaded from Forward Thinking as well from a number of other sites on the Internet. This file should be placed in the .../Bentley/Program/Microstation/mdlsys/required folder to ensure that the mdl is automatically activated when you start MicroStation. The second file is a text file with the extension of MDF. This file contains the information required by barmenu.ma to build the menus you wish to use. This MDF file can be kept anywhere on the network but we must be careful that the directory is available to all users and has the same network. We'll see why shortly. Let's take a look at how to create a basic menu file! My Civil MDF File Creating and editing MDF files is a very easy process. But having said that, it's important to point out that all editing should be done in a simple text editor such as WordPad or Notepad. This will eliminate any formatting and syntax errors which may occur with editors such as MS Word. To create your first MDF file, open Notepad and save the default empty file to any directory and call it civil.mdf. This file will be then be used to set our standard levels, colours, line codes and weights. Rather than go on about it too much, you can download my CIVIL file and open it with the appropriate text editor. (Note, you may want to rename this file) Let's take a look at the completed MDF file below:
There are a few important things to remember with MDF files. The first is that any MDF file must start with a semi-colon ( ; ). This denotes the beginning of the menu structure and becomes important when dealing with multiple menu headings, as we will see in future tutorials. The next line is the name of the menu item, which in this case is CIVIL. The next part is to create the notation for the pulldown section of this menu item, where a curly bracket ( { ) denotes the start of the pulldown. For example, notice that the line which reads Levels 1-31 is preceeded and superceeded by a {. This indicates the name of the sub-menu. Nothing to it. Next we create the individual line notations for the sub-menu and the commands associated with them. LV=1 EXISTING/NATURAL SURFACE, "LV=1;CO=0;WT=O;LC=0" Let's take a closer look at this: LV=1 EXISTING/NATURAL SURFACE, is what might be called the descriptor and it's what we click on from the menu. Note that the comma ( , ) indicates the end of the descriptor. "LV=1;CO=0;WT=O;LC=0" is the actual MicroStation command string enclosed in double-quotes ( “ “ ). For more information about MicroStation command and command strings, please refer to the following resources:
Configuring a Barmenu. To be able to get the barmenu to work, we must add a new configuration variable to MicroStation. If you have a CAD Administrator, please ensure that you have their permission before changing or adding any MicroStation configuration variables. Too add the new variable, open a file in MicroStation, go to Workspace > Configuration and the Configuration dialog box will come up. Click on the New button and in the dialog box type barmenu in the Variable section. Next we type the full path and the name of our mdf file in the New Value section of the dialog box. For this tutorial we'll use the civil.mdf we have just created as our file name. The following image is an example path and file name.
Now we click on OK to accept the new variable and then OK again to accept the change to the configuration. We also click on Yes to accept all of the changes we have just made. These changes are now active and there is no need to restart Microstation. All you have to do now is go to Utilities > MDL Applications and load barmenu.ma
Trouble Shooting If you have trouble loading the barmenu, check the following:
If you still have trouble, it could indicate a corrupt mdl or mdf file. Well, that's it for the first lesson. I encourage you to give this a try and reap the benefits of barmenu's today!
AskInga Article #59