Clear Menu Groups

Discussion in 'AutoCAD' started by Brooks Mccleery, Jan 27, 2005.

  1. I am looking for a way to clear all menu groups at startup, and then reload a specific set of menu groups. Could someone point me in the right direction?

    Brooks
     
    Brooks Mccleery, Jan 27, 2005
    #1
  2. Here's what I use to force a reload of all my menus:

    ;;Reloads all standard menu files
    (defun C:MNU ( / personal)
    (command "_menu" "acad2005")
    (command "menuload" "acetmain")
    (command "menuload" "SimpsonAlpha")
    (command "menuload" "dwaTools")
    (command "menuload" "dwaAccel")
    (command "menuload" "dwaSM")
    (if (setq personal (findfile "personal"))
    (command "menuload" personal)
    )
    )


    reload a specific set of menu groups. Could someone point me in the right
    direction?
     
    Allen Johnson, Jan 27, 2005
    #2
  3. thanks for the speedy reply, that is what I was looking for in part, and I assumed it would look something like that. Would there be a way to unload all menus before reloading them. my concern would be someone appending a 1 off menu.

    Thanks again

    Brooks
     
    Brooks Mccleery, Jan 27, 2005
    #3
  4. The MENU command appears to dump any previously loaded menus as well a
    partial menus. So when the MENU command is executed, all the other menus
    seem to get unloaded.


    assumed it would look something like that. Would there be a way to unload
    all menus before reloading them. my concern would be someone appending a 1
    off menu.
     
    Allen Johnson, Jan 27, 2005
    #4
  5. Brooks Mccleery

    Dommy2Hotty Guest

    That is correct. Just f.y.i. "MENUUNLOAD" (two u's) will unload the menu specified.
    Code:
    (command "menuunload" "RussCarlsonPartial")
     
    Dommy2Hotty, Jan 27, 2005
    #5
  6. Hi,

    I have a menu which I edit very regularly.

    I put this code in the MNL file for the menu.

    The value of 50 in "p50" guarantees that the menu will be the last one
    displayed. You can put specific locations, for example if I always wanted
    it to be 3rd menu I would use p3

    You could extend this code to do exactly what you want.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Convenience commands for developing and testing the menu
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun C:DevelMenu ()
    (command "menuunload" "Devel")
    (command "menuload" "C:\\Program
    Files\\CADApps\\Devel\\Programs\\Devel.mnu")
    (menucmd "p50=+Devel.Devel")

    )


    --

    Regards,


    Laurie Comerford
    www.cadapps.com.au
     
    Laurie Comerford, Jan 27, 2005
    #6
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.