You are currently reviewing an older revision of this page.
Original Article Date: March 30, 2001
In Sean's Fly with Barmenus - Part 1 he introduced some very basic concepts regarding barmenus. Let's now take a look at building a loop!
Now that we can take off and land without crashing, lets take a look at our first trick....a "loop". Multiple Directories When building barmenus, we can set up multiple items for each sub-menu. For example, we could have a CIVIL menu item which contains two sub-menus: Levels 1-31 and Levels 32-63. And each of these sub-menus would then contain the individual commands to execute. This is where we start to see the power of using barmenus - being able to easily access each discipline quickly when drawing production is paramount. To begin with, let's take a look at a completed MDF file and as with with our first MDF file, notice the structure and syntax to define each of the menu items (CIVIL, Levels 1-31 and Levels 32-63). Be advised that if the brackets ( { } )are placed incorrectly within the file, then barmenu.ma will not recognize and load the file. At this stage of building our barmenus, this is not so much of a problem. However, imagine looking for the syntax errors in a much larger file. That would be a nightmare!! When the above MDF file is loaded, we should see the following barmenu:
Now we're cooking with gas. As you can see this is pretty straight forward. The key to creating this type of structure in a barmenu is the following syntax in the MDF file:
Note the syntax required where the menu changes to a new directory. This is priority #1 when creating barmenus.
Something Interesting OK class, let's see who's awake. Did you notice the new title of the barmenu? That's right, it's ForwardThinking! This is a nice little touch that makes our barmenu a look a little more professional. To do this, we use the standard programming tools delivered with MicroStation. The mdl we will be using is called builder.ma and is installed when you select the MDE Programming Tools during your installation of MicroStation. If you can't find this file, then simply load the Programming Tools before continuing. To start, pick Utilities > MDL Applications and load builder.ma. You should see the following dialog box:
Now click on the Load... button and another dialog box will appear:
Click on Select... and find barmenu and click OK. (I recommend that you keep it in Bentley\Program\MicroStation\mdlsys\required .) Now that it's in the "Load Dialog" box, click on OK there as well. We should now have the following on screen:
The next bit is relatively easy. Simply double-click on the ‘Barmenu' title and change the title to suit your needs. When done cick on OK, Save and exit all dialogs.
Well, there you go...your first loop-de-loop. Not too shabby eh? Stay tuned for further flight instructions.
AskInga Article #60