Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
MicroStation
  • Product Communities
  • More
MicroStation
[Archived] AskInga Wiki Fly with Barmenus - Part 1
    • Sign in

    • -AskInga
      • +3D MicroStation
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • +Colours
      • +Conversion - Translation
      • +Coordinate Input
      • +Design Settings
      • +Dimensions
      • +DWG
      • +EDG
      • +Element Manipulation
      • +Element Properties
      • +Element Selection
      • +Freeware - Shareware
      • -Interface Look And Feel
        • Add a line separator in a barmenu
        • Add custom file types to list files of type
        • Add your favorite web-site to the menu bar
        • Adding icons to your tools
        • Adjust the response time for pop-up dialogs to close
        • Adjust width of message center
        • All about function keys and function key menus
        • An introduction to templates, tasks and tools
        • Auto-hide the tools settings when cursor gets too close
        • Auto-restore status bar
        • Barmenu wars - comments from CCM
        • Change how levels are displayed in the attributes dialog
        • Change screens
        • Change system colour for disabled menu item with this macro
        • Change the weight of your V7 element handles
        • Change your task bar icon
        • Create clickable screen menus
        • Create custom icons with ease
        • Customize the width of the level picker
        • Customize where to use position mapping
        • Customizing your mouse buttons
        • Default button and function keys
        • Dialog box IDs
        • Dialog column display
        • Disable auto-highlighting when passing cursor over elements
        • Dock stuff to the left of file in the menu bar
        • Don't show tools you seldom use
        • Easier access to level locks and other stuff
        • ESC to go home
        • Exceed function key character limit
        • Export MicroStations icons from the open DGN library
        • Extract information from dialogs
        • Faster switching between folders
        • File icons in the MicroStation manager
        • Fly with Barmenus - Part 1
        • Fly with Barmenus - Part 2
        • Fly with Barmenus - Part 3
        • Get dialog IDs from an external file
        • Get rid of tool boxes
        • Get to the keyin window faster
        • Give MicroStation an antiqued look
        • How to customize displayed columns in MicroStation manager
        • Importing customization from M01 and STG files
        • Improve on the Dmsg sinkall toggle command
        • Improved dynamics in MicroStation V8.5 will rock you
        • Keyin for the menu bar
        • Keyin for toggling the message center
        • Keyin to toggle dialogs on and off
        • Keyin toggle for the status bar
        • Keyins for the WinOpen Windows file open dialogs
        • Keyins or data point tentative point and reset
        • Keyins to toggle dialogs and toolboxes (pre-V8)
        • Keyins to toggle toolboxes (V8)
        • Left-handers unite change position mapping to your side
        • Load different function key menus
        • Make your toolbox pop up and down
        • Maximize real estate when drawing with ByLevel definitions
        • Maximum number of open GUI items
        • Miss the old main tool frame in MicroStation V8 XM Edition
        • Missing snaps
        • Move the menu bar
        • Navigate through task list quicker
        • Open current task as pop-up under your cursor
        • Open dialogs from primary tools under your cursor
        • Open the main task or toolbox near your cursor
        • Pop-up menu in the models dialog
        • Position mapping continues to work if toolbox is closed
        • Press and hold the reset for pop-up menu
        • Prevent tool boxes from changing orientation when moving
        • Prompts too long
        • Put the focus in the tool settings dialog
        • Put the focus into the tool settings window when a tool is selected
        • Quick select with position mapping
        • Quickly change screens on dialogs
        • Remove open URL from file menu
        • Remove send from the file menu
        • Remove send viecon plot from the file menu
        • Reorder the task list
        • Restore deleted menu items in MicroStation V8 XM Edition
        • Restore menu bar customizations
        • Right click menu in the tool settings box
        • Save your messages
        • Set the pointer circle to a different colour
        • Sidebar Menus
        • Small triangles mysteriously showing up in your views
        • Stuck dialogs
        • Swap user interfaces on the fly
        • Tips for Barmenus
        • Toggle the display of the ACS triad
        • Transparent dialogs
        • Turn on-off positional mapping aids
        • Unwanted datapoints
        • Use shift to activate representative or previous tool
        • Useful DMSG keyins
        • Using a tablet take a peek at the new V8.5 menu
        • Using Named Expressions to drive interface items – A sample
        • Using WinOpen to change MicroStation's dialogs
        • Utilize the space beside the menu bar to dock tool boxes
      • +Internet - E-Links - Links
      • +Keyins
      • +Levels
      • +Line Styles
      • +Models
      • +MSM Archive
      • +Other
      • +Presentations
      • +Printing - Plotting
      • +Programming - Automation
      • +Rasters - Images
      • +References
      • +Tags - Data Fields - Fields
      • +Text - Fonts - Annotation
      • +Views
      • +Windows - Interacting With
      • +Workspaces - Configuration
    • graffiti

     
     Questions about this article, topic, or product? Click here. 

    Fly with Barmenus - Part 1

    AskInga logo

    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:

    • The Power of Keyins
    • How to string keyins together or create keyin scripts
    • The V7 Keyin List
    • The keyboard shortcuts



    Lastly we close the sub-menu by placing two lines - each consiting of a curly bracket ( } ) as shown in the image above. Now we're ready to go. All we have to do is configure MicroStation to recognise the mdl and it's associated MDF file.

    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:

    1. Ensure that the path and mdf name are correct in the configuration variable we just created.
    2. Make sure the syntax for the mdf file is correct and that all notations are in place.



    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

    • Askinga
    • Automation
    • Programming
    • Article
    • Share
    • History
    • More
    • Cancel
    • Anonymous Created by Anonymous
    • When: Thu, May 29 2008 10:49 AM
    • Jordan Stierly Last revision by Jordan Stierly
    • When: Fri, Jun 11 2010 10:35 AM
    • Revisions: 7
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2022 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies