startup functions

Discussion in 'AutoCAD' started by Jamie Duncan, Mar 7, 2005.

  1. Jamie Duncan

    Jamie Duncan Guest

    I have a partial menu that is loaded at start up. On my pc at home, when I
    update the mns file the pops sometimes disappear, and sometimes not. The
    menuload command allows the user to reset the pops, but I'm wondering if
    there is an easy way to make sure the partial mennu is loaded and I can test
    for the pops?

    Should this be in the .mnl file or in the post-initialization startup
    defunq?

    Thanks!
     
    Jamie Duncan, Mar 7, 2005
    #1
  2. Jamie Duncan

    ECCAD Guest

    Princess,
    Something like this works.
    ;; Menu_Load.lsp
    ;; Complements, Bob Shaw, www.bobscadshop.com
    ;;
    (setq Menu_Path "Z:/STANDARDS/PKLISP/"); Path to Network Menus
    (setq Menu_Name "PKMenu"); default pop menu to load
    (setq Group_Name "PKTOOLS"); groupname assigned in .mnu or .mns file
    ;;
    ;; Load Pop Menu
    ;;
    (if (findfile (strcat Menu_Path Menu_Name ".mnc"))
    (progn
    (if (/= (menugroup Group_Name) nil)
    (command "_MENUUNLOAD" GroupName)
    ); end if
    (if (= (menugroup GroupName) nil)
    (progn
    (command "_MENULOAD" (strcat Menu_Path Menu_Name))
    (menucmd (strcat "P16=+" GroupName ".POP1"))
    ); end progn
    ); end if
    ); end progn
    ); end if
    (princ)

    Bob
     
    ECCAD, Mar 7, 2005
    #2
  3. Jamie Duncan

    Jamie Duncan Guest

    Thanks Bob - I'm going to take a look at that tonight!

    I had a heck of a time finding that stuff in the acad manuals
     
    Jamie Duncan, Mar 7, 2005
    #3
  4. Jamie Duncan

    mmm Guest

    So Bob, if I had a bunch of pops - I should number them POP1 through POP5
    say?

    and then repeat the menucmd for each pop?

    there's no way of just loading all pops at once?

    thanks..

    --
    Princess Jamie,

    Life shrinks or expands in proportion to one's courage.
    - Anais Nin

    | Princess,
    | Something like this works.
    | ;; Menu_Load.lsp
    | ;; Complements, Bob Shaw, www.bobscadshop.com
    | ;;
    | (setq Menu_Path "Z:/STANDARDS/PKLISP/"); Path to Network Menus
    | (setq Menu_Name "PKMenu"); default pop menu to load
    | (setq Group_Name "PKTOOLS"); groupname assigned in .mnu or .mns file
    | ;;
    | ;; Load Pop Menu
    | ;;
    | (if (findfile (strcat Menu_Path Menu_Name ".mnc"))
    | (progn
    | (if (/= (menugroup Group_Name) nil)
    | (command "_MENUUNLOAD" GroupName)
    | ); end if
    | (if (= (menugroup GroupName) nil)
    | (progn
    | (command "_MENULOAD" (strcat Menu_Path Menu_Name))
    | (menucmd (strcat "P16=+" GroupName ".POP1"))
    | ); end progn
    | ); end if
    | ); end progn
    | ); end if
    | (princ)
    |
    | Bob
     
    mmm, Mar 8, 2005
    #4
  5. Jamie Duncan

    ECCAD Guest

    Princess,
    Yes, the Group may contain several 'pop'x sections.
    Just repeat the lines like:
    (menucmd (strcat "P14=+" GroupName ".POP1"))
    (menucmd (strcat "P15=+" GroupName ".POP3"))
    (menucmd (strcat "P16=+" GroupName ".POP2"))
    etc.
    You 'order' the placement by specifying which group.popx
    to place in menu 'P#=' section.

    Bob
     
    ECCAD, Mar 8, 2005
    #5
  6. Jamie Duncan

    mmm Guest

    Thanks Bob,

    your offering made me think - and I studied the acet-init function in the
    express.mnl and figured out how to do it with a check to find the last pop
    menu used.



    --
    Princess Jamie,

    Life shrinks or expands in proportion to one's courage.
    - Anais Nin

    | Princess,
    | Yes, the Group may contain several 'pop'x sections.
    | Just repeat the lines like:
    | (menucmd (strcat "P14=+" GroupName ".POP1"))
    | (menucmd (strcat "P15=+" GroupName ".POP3"))
    | (menucmd (strcat "P16=+" GroupName ".POP2"))
    | etc.
    | You 'order' the placement by specifying which group.popx
    | to place in menu 'P#=' section.
    |
    | Bob
     
    mmm, Mar 9, 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.