Test Partial Menu Loaded R13

Discussion in 'AutoCAD' started by d_r_wright, Nov 9, 2004.

  1. d_r_wright

    d_r_wright Guest

    Greetings,

    This bit of code works in ACAD 2204

    (setq loaded (menugroup "DSI_PID"))

    But not in R13. I want to load partial menus in R13 in ACAD.LSP since I have to use 13 at a customer site.

    I have no problem loading the partial menu in ACAD.LSP for 13 but once loaded I get errors when I open a new drawing since the partial menus are already loaded. I can't figure out the equivalent to:

    (setq loaded (menugroup "DSI_PID"))

    for R13.

    I posted a similar question in the ACAD 13 forum a while back but apparently there are only about 6 people in the world still using 13 and they all have questions and no answers.

    Thanks for any help,
    Doug

    Doug
     
    d_r_wright, Nov 9, 2004
    #1
  2. d_r_wright

    d_r_wright Guest

    d_r_wright, Nov 9, 2004
    #2
  3. d_r_wright

    d_r_wright Guest

    Thanks to AFRALISP here is how I fixed the problem:

    ///////////////////////////////////////////////////////////

    Small portion of one of the loaded menus

    //
    // AutoCAD menu file - C:\r13\win\support\DSI2K_Pdn.mnu
    //

    ***MENUGROUP=DSI2K_Pdn

    ***POP1
    **LISP
    ID_Lisp [Lisp]
    ID_Autoname [Autoname]^C^C(load "autoname");autoname
    ID_Attredef [Attredef]^C^C(load "Attredef");Attredef
    ID_Branch [Branch]^C^C(load "Branch");Branch
    [--]
    ID_Chgtext [->Change text]

    ///////////////////////////////////////////////////////////

    Syntax from AFRALISP to test for presence of partial menu
    http://www.afralisp.com/tips3.htm

    (menucmd "Gmenugroup.nametag=?")


    ///////////////////////////////////////////////////////////

    This is the ACAD.LSP I use for our customer who uses R13

    ;Loads partial menus, automatically
    ;This file should be in the AutoCAD support directory.
    (defun S::STARTUP (/ temp diafile)
    (setq temp (menucmd "GDSI2k_PDN.ID_Autoname=?"))
    (if (= temp nil)
    (progn
    (setq diafile (getvar "filedia"))
    (setvar "filedia" 0)
    (command "menuload" "c:/r13/win/support/DSI_Conduit.mns")
    (command "menuload" "c:/r13/win/support/DSI_PID.mns")
    (command "menuload" "c:/r13/win/support/DSI2K_PDN.mns")

    (menucmd "P7=+DSI2k_PDN.pop1")
    (menucmd "P8=+DSI2k_PDN.pop2")
    (menucmd "P9=+DSI2k_PDN.pop3")
    (setvar "filedia" diafile)
    )
    );END Temp nil
    ); END defun STARTUP

    ///////////////////////////////////////////////////////////
     
    d_r_wright, Nov 9, 2004
    #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.