Acad.mns Customization

Discussion in 'AutoCAD' started by Mark Douglas, Jul 7, 2003.

  1. Mark Douglas

    Mark Douglas Guest

    Hi there Everyone, I have created a custom pull down menu here in my office,
    and want to be able to update the menu with the New Codes that we come up
    with. The problem is, all I can think of to update the menu is to menu
    unload ...then menu load it back in to recognize the new updates to our
    custom Pull Down. If would be nice so i dont have to do all this on every
    computer in the office that whould be awsome!!............Thanks.Mark
    Douglas
     
    Mark Douglas, Jul 7, 2003
    #1
  2. Mark Douglas

    Kevin Nehls Guest

    Create your own partial menu and load that. Do not edit the acad.mns/mnu
    files as you'll lose your changes when you upgrade.

    If you create your own partial menu and load that then when you make changes
    to the mnu file on your system, then unload/reload on your system you just
    need to distribute those files and the ppl will have the updates without
    having to do that.

    You could also put that menu on the network and have it loaded from there so
    you don't even have to copy it to each workstation, your user's just get the
    updates the next time they open autocad.

    You could also create a lisp routine to reload the menu so they don't even
    need to restart autocad, you just tell them to issue the command to reload
    the menu and it's done.
     
    Kevin Nehls, Jul 7, 2003
    #2
  3. Mark Douglas

    Tom Smith Guest

    Kevin's right, it's cleaner and better to keep your customizations
    separately in a partial menu. All the same things apply as far as
    distributing the revised partial menu. If the menu is shared, they'll see
    the new one next time they open Acad. If it's local, same thing ... if you
    replace an MNS and it has a later date than the corresponding MNC, it will
    recompile next time they open Acad.

    I just don't bother with forcing menus to unload and reload on the spot. For
    one thing, pulldowns get lost when the menu is unloaded, so there's the
    extra step of getting them back in place when you reload it. That doesn't
    happen when you leave the menu alone and let it recompile. I take the lazy
    way out and don't bother with the unload/reload.

    Outside of a testing/debugging situation, it doesn't matter to me whether a
    new menu get loaded instantly. It's going to recompile automatically the
    next time Acad is opened anyway. Send around your update at the end of the
    day, and everybody will have a new menu first thing in the morning.

    Tom
     
    Tom Smith, Jul 7, 2003
    #3
  4. Mark Douglas

    ghaddad Guest

    create first younameit.mnu file, autocad will create younameit.mns
    just edit your partial menu younameit.mns load it w/ menuload command
    don't even touch the younameit.mnu file until you are sure that it is the final one save it just for backup.
    let the profile you are sharing and using look for acad.mns for the main menu so each user can customize their own separately without you loading the menu and force them to lose whatever work they did on their menus.
    make sure you put the younameit.mns file in a shared directory and path it in the shared profile.
    does it make sense?
     
    ghaddad, Jul 7, 2003
    #4
  5. Mark Douglas

    Kevin Nehls Guest

    I'm lazy and I don't like waiting for acad to startup or hearing "my menu
    isn't there". The code below is in my MNL file. Not only does it
    "autoload" the pulldowns, but it also creates a command that will unload and
    reload the menu. If you menuload just the mns/mnu file, it loads the MNL
    file which executes the code below upon loading thus loading the popup
    menus.

    I actually created this for testing purposes as it's faster than
    menuunload/menuload, but it's turned out to be a nice tool to have.

    I also have code in out global acaddoc.lsp that checks to see if the MNL
    file was loaded (via a flag set in the MNL file), if not it loads the MNL
    file, thus loading the menu. I have the same sore of code in the MNL file
    for the acaddoc.lsp file. This completely bypasses the MRU bug as well as
    ensuring that our standard menu and lsp routines are always loaded. The
    only way for this to not work is if the user removed the support paths
    pointing to the network.

    ;;; Load SafeWorks Menu if not loaded
    (_swsm:LoadSWMenu)

    (defun _swsm:LoadSWMenu (/ mnuloc)
    (if (and (not (menugroup "SAFEWORKS"))
    (or (setq mnuloc (findfile "SAFEWORKS.MNS"))
    (alert "Cannot find the SafeWorks menu file.\nCheck your support
    paths.")
    )
    )
    (command "_.MENULOAD" MNULOC)
    )
    (princ)
    )

    (defun _swsm:LoadPullDowns ()
    (menucmd "GAMPP.WINDOW=+SAFEWORKS.POP1")
    (menucmd "GAMPP.WINDOW=+SAFEWORKS.POP2")
    (menucmd "GAMPP.WINDOW=+SAFEWORKS.POP3")
    (menucmd "GAMPP.WINDOW=+SAFEWORKS.POP4")
    (menucmd "GAMPP.WINDOW=+SAFEWORKS.POP5")
    (princ)
    )

    ;;; Load Pull downs if not loaded
    (_swsm:LoadPullDowns)

    ;;FUNCTION TO RELOAD SAFEWORKS MENU
    (defun C:SAFEMENU ()
    (if (menugroup "safeworks")
    (command "menuunload" "safeworks")
    )
    (_swsm:LoadSWMenu)
    (princ)
    )
     
    Kevin Nehls, Jul 7, 2003
    #5
  6. Mark Douglas

    John Crocco Guest

    The way I have done it it to put the autocad files on a network shared file
    server and have those paths on each workstation, along with all lisp,
    blocks, plotter info, etc. Then, when I add or change a plotter, or the mnu
    file, it changes on ALL machines when they reopen autocad.
     
    John Crocco, Jul 7, 2003
    #6
  7. Mark Douglas

    Tom Smith Guest

    Thanks Kevin. That does look like a nice tool to have around.
     
    Tom Smith, Jul 8, 2003
    #7
  8. Mark Douglas

    Kevin Nehls Guest

    1) I agree as it makes it easier on the user.

    2) Where is this written. I've read through most of the help file on menus
    and don't remember reading this anywhere. As I stated. I do that for
    testing so that I know I'm not using a production menu.
    Yes, but I'm just testing. See I'm the CAD Admin here and I
    edit/create/fix/etc everything related (remotely or directly) to CAD here.
    Really, since when? I've had over 30 up there (for testing purposes)
    becuase someone said there was a limit. I even closed acad and re-opened
    and all were still there. People have mentioned this several times and I've
    tested it a couple of times. It makes a mess, but I've never had a problem
    with putting a ton of pull-down menus up there.

    Kevin
     
    Kevin Nehls, Jul 10, 2003
    #8
  9. Mark Douglas

    PF Guest

    snip-->>
    I've had over 30 up there (for testing purposes)
    becuase someone said there was a limit. I even closed acad and re-opened
    and all were still there. People have mentioned this several times and I've
    tested it a couple of times. It makes a mess, but I've never had a problem
    with putting a ton of pull-down menus up there.

    Oh, yeah, you Are right - as I discovered once upon a tinme, too.
    It is a mess when the POPs go to 2 (or 3) lines - and they get hard to pick.

    As for "who said" ... [I've read through most of the help file on menus
    and don't remember reading this anywhere]
    Some stuff isn't In the Help files... but in tutorials. I seem to have seen
    it somewhere, but can't recall whose say-so I've been loyal to.
    Also, the ORDER that Autodesk uses in its POP menus is identical (guess why)
    to the order of pop menus in Microsoft products. So it's also for user
    familiarity.

    Nonetheless... a "custom" menu is Yours to customize... just know the root
    of other user's confusion when (if) it comes up <G>.
     
    PF, Jul 11, 2003
    #9
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.