Autoload partial menus

Discussion in 'AutoCAD' started by Leothebuilder, Aug 13, 2004.

  1. Yes.....I have been a good boy and did a search on autoloading menus.
    Problem is....I couldn't find anything that helps me.

    I have got a couple of partial menus, that I would like to autoload when
    I start up autocad.

    Got as far as another lisp that autoloads the menus, but then I still have
    to
    insert them into the menubar. Is there a way to do that automatically ?

    Surely there has to be a way

    Leo
     
    Leothebuilder, Aug 13, 2004
    #1
  2. Leothebuilder

    Tom Smith Guest

    You don't need to do anything. No programming required. Use menulaod to load the partial menus and you're done. If pulldowns don't show up, then use menuload to place them in the manubar. You only have to do it once. That information is kept in your profile. The menu wil come back whenever Acad starts.

    That's the way it's supposed to work. I've run several partial menus ever since R14 and have never needed to do anything programmatically to make them load. If it isn't working that way, then something is broken. Most likely some other (unnecessary) menu-loading scheme that's preventing things from working normally.
     
    Tom Smith, Aug 13, 2004
    #2
  3. Leothebuilder

    MP Guest

    Menuload whatever menus you want.
    Set the menubar the way you want.
    Save the named profile to an arg file
    Start acad from desktop shortcut using the profile switch with your named
    profile.arg
    eg: in Target of shortcut properties box:
    "C:\Program Files\AutoCAD 2005\acad.exe" /P
    "drive:\...path...\MyProfile.ARG"

    even without doing that acad should start with what ever menus were loaded
    the last time it ran,
    unless multiple users are on the machine changing menus

    hth
    Mark
     
    MP, Aug 13, 2004
    #3
  4. Thanks,


    I'll have to check the profile thingie.....cuz my re-starting autocad
    doesn't reload
    my partial menus automatically.....
    I'll try and let you know


    Leo
     
    Leothebuilder, Aug 13, 2004
    #4
  5. Leothebuilder

    Ratnakar Guest

    Please follow the following sequences:
    1. Put the MNU file containing your partial menu definations in the Library search path. Check in OPTIONs command /Files tab.
    2. Use MENULOAD to load the meanu file. Also include your partial menu item (Pulldown or Toolbar whatever has been defined in the MNU file) to show on the screen

    Note: if your MNU file has wrong syntax it will give message in the command line.
    Once you are successful in loading your menu in this way, it will be automatically available in your next autocad session.
     
    Ratnakar, Aug 13, 2004
    #5
  6. Hi,

    In later versions of AutoCAD the Menu files can be any where. The AutoCAD
    path is not necessary except for the bitmaps if they are not in a DLL file.

    The other limitation is that AutoCAD when it closes down, only stores 24
    partial menus in the registry, so that if you have more than 24, only the
    first 24 are restored on Start up.

    Land Desktop uses a "Menu Palette" to load any number of menus.

    As I normally work with about 35 menus, my startup routine is to open the
    first drawing, go to Palette Manager and load my
    "Work" palette. It's then available till I close down.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    Library search path. Check in OPTIONs command /Files tab.
    item (Pulldown or Toolbar whatever has been defined in the MNU file) to show
    on the screen
    automatically available in your next autocad session.
     
    Laurie Comerford, Aug 13, 2004
    #6
  7. That comment makes it sound like you don't have unique MenuGroup names for
    your partial menus. Those MenuGroup names are a must.

    --
    R. Robert Bell


    Thanks,


    I'll have to check the profile thingie.....cuz my re-starting autocad
    doesn't reload
    my partial menus automatically.....
    I'll try and let you know


    Leo
     
    R. Robert Bell, Aug 13, 2004
    #7
  8. I tried the profile suggestion, but that does not
    autoload my partial pull down menu.
    In this case the menu is called "PKTools" menu and it
    is place on the "Z" drive (server)
    I've included the location on the Z drive in the search path,
    but it still won't autoload with each Acad session.
    I've written a small lisp routine that can autoload the menu,
    But I'm stumped of hoe to automatically insert the menu
    into the menubar. Looked in help file and tried this line :
    (menucmd "P6=+PKTools.pop1") this doesn't work either for me.
    Leo
     
    Leothebuilder, Aug 14, 2004
    #8
  9. Leothebuilder

    ECCAD Guest

    Leo,
    Another approach..

    ;; MENULOAD.LSP
    ;;
    ;; Load the "Menu_Name" menu..from calling process..
    ;;
    (if (= Menu_Name nil)(setq Menu_Name "MYMENU")); default
    ;;
    (setq Menu_Path "c:/path/path/menus/"); Path to local Menus
    ;;
    ;; Load Pop Menu
    ;;
    (if (= Menu_Name "MYMENU")
    (progn
    (if (findfile (strcat Menu_Path Menu_Name ".mnc"))
    (progn
    (if (/= (menugroup "GROUPNAME") nil)
    (command "_MENUUNLOAD" "GROUPNAME")
    ); end if
    (if (= (menugroup "GROUPNAME") nil)
    (progn
    (command "_MENULOAD" (strcat Menu_Path Menu_Name))
    (menucmd "P16=+GROUPNAME.POP1")
    ); end progn
    ); end if
    ); end progn
    ); end if
    ); end progn
    ); end if

    Bob
     
    ECCAD, Aug 16, 2004
    #9
  10. Thanks Bob,

    Couldn't get this to work, probable because of my limited knowledge
    of how to finish your routine.

    Leo
     
    Leothebuilder, Aug 17, 2004
    #10
  11. Leothebuilder

    ECCAD Guest

    Leo,
    If you want, you could E-Mail me your .mnu or .mns file, and
    I can take a peek, modify routine to suit.

    (remove the nospam + the "."

    Bob
     
    ECCAD, Aug 17, 2004
    #11
  12. Leothebuilder

    ECCAD Guest

    For those who were following. The problem was the 'lack' of the menugroup definition in the .mnu file. Once we placed a
    ***MENUGROUP=GROUPNAME
    in the file, recompiled, it loads just fine.

    Feedback from Bob.
     
    ECCAD, Aug 18, 2004
    #12
  13. Thanks a million Bob,
    It's working fine now.


    Leo


    definition in the .mnu file. Once we placed a
     
    Leothebuilder, Aug 18, 2004
    #13
  14. Which is exactly what I stated in this thread on 13 Aug 2004 at 7:31AM PDT.
    ;^)

    --
    R. Robert Bell


    For those who were following. The problem was the 'lack' of the menugroup
    definition in the .mnu file. Once we placed a
    ***MENUGROUP=GROUPNAME
    in the file, recompiled, it loads just fine.

    Feedback from Bob.
     
    R. Robert Bell, Aug 18, 2004
    #14
  15. Leothebuilder

    Tom Smith Guest

    That was a good catch, Bob. Of course Robert guessed the problem a couple of
    days sooner, but apparently the OP didn't know what to look for.

    Am I correct in assuming that once the menugroup glitch was fixed, the
    partial menu reloaded in every drawing without any need to force a reload
    with lisp each time?
     
    Tom Smith, Aug 18, 2004
    #15
  16. Leothebuilder

    ECCAD Guest

    Tom,
    The problem arose from a lack of a groupname in the menu.
    Once this was fixed, all is well. If the menugroup exists, it is
    unloaded, and reloaded. No problems.

    Bob
     
    ECCAD, Aug 19, 2004
    #16
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.