Jump to content
DaveC

Load CUI and All Pull Down Menus with lisp

Recommended Posts

DaveC

I need to load the "ACAD Cui" with lisp but only the "File, Window & Help" pull down menus are visible.

I'm following the sample in this link..   http://www.cadtutor.net/forum/showthread.php?26379-about-load-CUI-file

and I listing every single Pull Down Menu, but is not see the pull downs.

 

(setq AcadPath "C:\\Users\\<<username>>\\AppData\\Roaming\\Autodesk\\MEP 2018\\enu\\Support\\")

(setq cui_database
        (list "ACAD"                 ;<<< MENUGROUP
              (strcat AcadPath "acad.CUIX")    ;<<< PATH & CUI FILENAME
              "&File"                ;<<< MENUNAME
              "&Edit"                ;<<< MENUNAME
              "&View"                ;<<< MENUNAME
              "&Insert"                ;<<< MENUNAME
              "&Format"                ;<<< MENUNAME
              "&Tools"                ;<<< MENUNAME
              "&Draw"                ;<<< MENUNAME
              "&Dimension"            ;<<< MENUNAME
              "&Modify"                ;<<< MENUNAME
              "&Parametric"            ;<<< MENUNAME
              "&Window"                ;<<< MENUNAME
              "&Help"                ;<<< MENUNAME
              ;"&Power"                    ;<<< MENUNAME     
        ) ;_ end_list
         flag nil
    ) ;_ end_setq

 

I need to load ALL the pull down menus, please help.

 

thank in advance.

 

DC

 

 

Share this post


Link to post
Share on other sites
ronjonp

I thought by default all pulldown menus load if MENUBAR = 1  (setvar 'menubar 1)? Maybe your CUI is borked.

Share this post


Link to post
Share on other sites
DaveC

Thank you RONJONP,

the CUI is the original default from Autocad, if I loaded manually by using the command CUILOAD it load all the pull down menus,

the problem is if I use LISP. 

 

and Yes my MENUBAR = 1

 

 

Share this post


Link to post
Share on other sites
DaveC

- I GOT IT...

 

I used a different method/lisp,


(defun ACADCUILOAD  ( / old_cmdecho old_ribbonstate)
   (setq old_cmdecho(getvar "cmdecho"))
   (setvar "cmdecho" 0)
   (setvar "MENUBAR" 1)

   (if (not (menugroup "ACAD"))
      (command "cuiload" "C:\\Users\\<<USERNAME>>\\AppData\\Roaming\\Autodesk\\MEP 2018\\enu\\support\\ACAD.cuix")
   ); end IF
    (menucmd "p1=+ACAD.POP1.FILE")
    (menucmd "p2=+ACAD.POP2.EDIT")
    (menucmd "p3=+ACAD.POP3.VIEW")
    (menucmd "p4=+ACAD.POP4.INSERT")
    (menucmd "p5=+ACAD.POP5.FORMAT")
    (menucmd "p6=+ACAD.POP6.TOOLS")
    (menucmd "p7=+ACAD.POP7.DRAW")
    (menucmd "p8=+ACAD.POP6.DIMENSION")
    (menucmd "p9=+ACAD.POP6.MODIFY")
    (menucmd "p10=+ACAD.POP6.PARAMETRIC")
    (menucmd "p11=+ACAD.POP6.WINDOW")
    (menucmd "p12=+ACAD.POP6.HELP")

    (setvar "cmdecho" old_cmdecho)
     (princ)
)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×