Acad menu files

Discussion in 'AutoCAD' started by David, Oct 14, 2004.

  1. David

    David Guest

    Hi NG;

    I would like to add a command into the acad menu file.
    Should I change the *.mns or *.mnu file.
    Or both of them.

    TIA David
     
    David, Oct 14, 2004
    #1
  2. David

    Jimmy D Guest

    *.mnu is the template file and *.mns is the actual menu file that acad uses (compare with *.dwt and *.dwg).
    You should only change the *.mns file. If you are sure you want to keep this menu you can save the *.mns as *.mnu to replace the original menu template. Best to make a backup copy of the original *.mnu template first.
     
    Jimmy D, Oct 14, 2004
    #2
  3. David

    Walt Engle Guest

    Matter of opinion: I change the mnu file and then recompile.
     
    Walt Engle, Oct 14, 2004
    #3
  4. Except that the OP sounds like a noob, and may have edited toolbars, and if
    the OP doesn't understand that those changes go into the .mns, *not* the
    ..mnu, and does what you suggest... well, you may have an unhappy person.
     
    R. Robert Bell, Oct 14, 2004
    #4
  5. David

    Tom Smith Guest

    See the definitive Cadalyst articles at
    http://www.markcad.com/autocad/acadmenus.htm and
    http://www.markcad.com/autocad/acadtoolbars.htm.

    The MNU file is an essentially useless carryover from pre-R13 menu formats,
    and aside from rigid habit, the only reasons for using it are minor and
    obscure. (Compiling an MNS file scrambles the order of help strings --
    gasp! -- if you ever use them in custom menus, or care about their order,
    which doesn't affect their function.) The hazards and extra steps involved
    in using the obsolete MNU more than outweigh this tiny flaw in the MNS.

    From the first article cited::

    Ah, for the good old days before AutoCAD R13, when menu files were simple.
    There was an MNU file (the ASCII source file that you edited) and an MNX
    file (the binary file that AutoCAD read its menus from and compiled
    automatically after you made changes to the MNU file). Now we have deal with
    half a dozen different menu file types:

    Menu source files:

    menuname.MNU: Menu template or "pre-source" file. The MNU file is a vestige
    from the old MS-DOS days, when it was the file that you'd edit in order to
    customize a menu. It's only purpose now is to confuse you and to give
    AutoCAD the opportunity to obliterate your menu customization. You should
    delete it and edit the MNS file instead.

    menuname.MNS: Menu source file. The MNS file is the real menu source file:
    an ASCII file that you edit with a text editor in order to customize menus.
    This also is the file that the Toolbars dialog box modifies, if you're
    foolish or brave enough to try to use it to customize your toolbars. Note
    that, under certain circumstances, AutoCAD will create an MNS file from the
    MNU file automatically. This attempt to be helpful can overwrite important
    changes in the MNS file. That's why you don't want to have an MNU file.
     
    Tom Smith, Oct 14, 2004
    #5
  6. David

    Tom Smith Guest

    To expand a bit further, it's considered best practice to strictly separate
    your customizations from the standard Acad-supplied files.

    A better answer would be: Don't touch any of the Acad menu files at all.
    Create your own custom partial menu in the form of an MNS (with no MNU at
    all), in its own folder, and add that folder to your Acad search path. Then
    use menuload to load your partial menu in addition to the standard menu.
    This will make it far easier to migrate to the next version of Acad.

    When you upgrade, instead of tracking down every little thing you've done to
    the enormous standard menu over the course of this version, and then
    painstakingly duplicating them in the enormous standard menu in the next
    version, you'll have all your customizations in one place, and all you'll
    need to do is copy over the partical menu and menuload it.

    See Mark Middlebrook's excellent article on this approach at
    http://www.cadalyst.com/cadalyst/article/articleDetail.jsp?id=80817. Anybody
    who has gone through several upgrades -- and has a willingness to learn
    better ways of doing things -- eventually comes to realize that "modular"
    customization is the only way to go.
     
    Tom Smith, Oct 14, 2004
    #6
  7. Hi Tom,

    I have to strongly agree with your comment not to touch any of the AutoCAD
    supplied menu files. Everything you do will be lost when you upgrade and
    get new menu files with the new Autodesk supplied files.

    It is far better to create your own menu and then it can be carried forward
    merely with a "menuload"

    I do see a role for the MNU file though.
    For the user doing their own customisation it can be seen as a backup file
    for the MNS file and anyone could readily update the Toolbar information
    from an MNS file into the MNU file.
    For me, in putting menus together for commercial distribution, the MNS habit
    of scrambling the tool tip order is totally unacceptable and I work with MNU
    files and distribute MNU files. If there are no MNS and MNC files present
    then the MNU file gets loaded. I ensure this in our installation by
    deleting both, so that the customer gets the new menu when they install
    upgrades.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au
     
    Laurie Comerford, Oct 14, 2004
    #7
  8. David

    Tom Smith Guest

    Laurie, we've beat this drum before, but might as well rehearse it again for
    the new person's benefit.

    The *only* fly in the ointment when using MNS exclusively files is the
    scrambling of helpstrings order. You want them alphabetical, I understand.
    However, I don't do menus for commercial distribution, and I doubt that
    David is going to do that anytime soon either. His one-command personal menu
    can work fine without having on-screen help on that command.

    Me, I've never bothered with helpstrings at all. I'm pretty sure none of my
    users ever looks down there on the status bar to see what a command means in
    fine print. I doubt if many of them even know this feature exists. What may
    see like a necessity on a commercial menu can be utterly superfluous on a
    modest in-house menu. It's a training thing. I want them to know the menu, I
    don't want them reading nonsense such as "Reverses the most recent action"
    for U, for goodness sakes. If they need to read that, something is seriously
    wrong, and it's not in the menu. I do put tooltips on toolbar buttons for
    the benefit of beginners, since button icons can be a little cryptic, but
    those are part of the button definition and therefore aren't scrambled.

    As you tacitly admit, it's far safer for a non-expert user to deal
    exclusively with an MNS file, since that's where all their interactive
    toolbar changes are going. For a backup -- assuming that a casual user is
    going to backup every single toolbar change they ever make, which I've never
    seen any of them ever do -- what's wrong with simply right-dragging the MNS
    into the same folder in Explorer, and let its name be the default "Copy of
    MyMenu.MNS?" This is quicker, less confusing, and you don't even need to
    overwrite a file. They can keep Copy(2) and Copy(3) for all I care. It's
    exactly the way you'd copy any other file, nothing special, nothing
    AutoCADish, not special meanings of file extensions to keep straight, just a
    plain old file copy.
     
    Tom Smith, Oct 14, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.