autoload menu

Discussion in 'AutoCAD' started by Chuck, Nov 17, 2005.

  1. Chuck

    Chuck Guest

    I have a quick question regarding the two attached files. I have a
    "Buffalo" menu with a menuitem "holes" with the heading "Buffalo Hole
    Inserts".
    I am attempting to automatically load this menu (in it's absence) using the
    acad.lsp with the menuitem "holes" in the P11 position. What am I doing
    wrong?
    Thanks in advance.
    BTW the menu loads but the pulldown doesn't appear. If I load the menu
    manually the pulldown appears in the last position.
    -------------------------------------------------------------------------------------------
    acad.lsp


    ;This file loads the RAM Drafting Menus.
    ;See acaddoc.lsp for the loading of the RAM Drafting LISP routines.


    (if (not (menugroup"ram"))
    (progn
    (command "menuload" "ram.mns")
    (menucmd "P10=+RAM.RAM")
    )
    )

    (if (not (menugroup"buffalo"))
    (progn
    (command "menuload" "buffalo.mns")
    (menucmd "P11=+holes.buffalo")
    )
    )

    (if (not (menugroup"cadlibdu"))
    (progn
    (command "menuload" "cadlibdu.mns")
    )

    (princ)

    -------------------------------------------------------------------------------------------------------

    //
    // AutoCAD menu file - S:\ram customization\buffalo.mnc
    //

    ***MENUGROUP=Buffalo

    ***POP11
    **Holes
    [Buffalo Hole Inserts]
    [--]
    [9/16 Diameter
    Hole]^C^C-layer;make;drill3;color;red;;;circle;\diameter;9/16;-layer;set;0;;-hatch;select;l;;p;s;;
    [11/16 Diameter
    Hole]^C^C-layer;make;drill1;color;red;;;circle;\diameter;11/16;-layer;set;0;;-hatch;select;l;;p;s;;
    [13/16 Diameter
    Hole]^C^C-layer;make;drill1;color;red;;;circle;\diameter;13/16;-layer;set;0;;-hatch;select;l;;p;s;;
    [15/16 Diameter
    Hole]^C^C-layer;make;drill1;color;red;;;circle;\diameter;15/16;-layer;set;0;;-hatch;select;l;;p;s;;
    [--]
    [1-1/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.0625;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-3/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.1875;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-5/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.3125;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-7/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.4375;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-9/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.5625;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-11/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.6875;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-13/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.8125;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-15/16 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.9375;-layer;set;0;;-hatch;select;l;;p;s;;
    [--]
    [3/4 Diameter
    Hole]^C^C-layer;make;drill1;color;red;;;circle;\diameter;.75;-layer;set;0;;-hatch;select;l;;p;s;;
    [7/8 Diameter
    Hole]^C^C-layer;make;drill1;color;red;;;circle;\diameter;.875;-layer;set;0;;-hatch;select;l;;p;s;;
    [--]
    [1" Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-1/8 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.125;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-1/4 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.25;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-3/8 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.375;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-1/2 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.5;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-5/8 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.625;-layer;set;0;;-hatch;select;l;;p;s;;
    [1-7/8 Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;1.875;-layer;set;0;;-hatch;select;l;;p;s;;
    [2" Diameter
    Hole]^C^C-layer;make;drill2;color;red;;;circle;\diameter;2;-layer;set;0;;-hatch;select;l;;p;s;;
    [--]

    //
    // End of AutoCAD menu file - S:\ram customization\buffalo.mnc
    //
    -------------------------------------------------------------------------------------------------------------
     
    Chuck, Nov 17, 2005
    #1
  2. Chuck

    Peter Ruehle Guest

    Rather than use lisp, you could just use the menuload command, browse to the
    mns file and it will load. It will then be saved with the current profile
    (options) and will load with every session.

     
    Peter Ruehle, Nov 18, 2005
    #2
  3. Chuck

    Chuck Guest

    A friend found the problem for me.
    The proper command for menucmd was "P11=+buffalo.holes" not
    "P11=+holes.buffalo"
    In order to avoid the confusion I've renamed the menu item from holes to
    buffalo.
    Now my menucmd is "P11=+buffalo.buffalo"
    Thanks for your help.

     
    Chuck, Nov 18, 2005
    #3
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.