I use a routine that sets a POP Menu (shortcut menu) as the default, then displays it. I am trying to keep it in my partial CUI file so I don't have to "add it" to the standard ACA CUI everytime I upgrade. It doesn't work when I have it in my Partial CUI file, but it does work when I copy it to main ACA CUI.
(MENUCMD "P0=POP836")
(MENUCMD "P0=*")
(SETQ DDST1 (GETDIST "Select Width"))
(MENUCMD "P0=P")
Is there something I can add to the first menucmd line above to search for it in my partial CUI file? Partial CUI is called CADVR.CUI
Thanks for the help.
John W
Hey there. Maybe something like this?
(setq acadobj (vlax-get-acad-object)) (setq thisdoc (vla-get-activeDocument acadobj)) (setq menus (vla-get-menuGroups acadobj)) (vlax-for n menus (if (= (vla-get-name n) "CADVR") (setq flag T) ) (terpri) (princ (strcat "\n ..."(vla-get-name n))) ) ;; If CADVR was among the loaded menus then process it.. (if (= T flag) (progn
(MENUCMD "P0=POP836")
(MENUCMD "P0=*") (MENUCMD "P0=P") );progn
);if
HTH
A little less legwork...
(if (menugroup "CADVR") (progn (MENUCMD "P0=POP836") (MENUCMD "P0=*") (MENUCMD "P0=P") ) )
Good afternoon. I know this is an old post but my problem still remains. I cannot bring up the "Shortcut Menus" from my custom partial cuix file. The following is an example of how the code is currently written:
(IF (OR (= DDST1 0) (= DDST1 NIL) (= ACTION "Y"))
(PROGN
(MENUCMD "P0=POP836")
(MENUCMD "P0=*")
(SETQ DDST1 (GETDIST "SELECT DOOR SIZE"))
(MENUCMD "P0=P")
)
)
The code provided by bhull1985 appears to may work but I don't know where to place that code into my lisp routine. Do I have to insert that amount of code at every single instance of my "POP" menu callouts? Or does some of it get placed at the beginning of the routine and some of it at every POP callout???? Not sure how to use what's been provided.
If anyone can further assist me as to how to add the code, or if there is an easier way (since it has been almost 4 years since I posted this), I would really appreciate it!
Thanks!
John