Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cant get Shortcut Menu (POP menu) to display when its in Partial CUI file?

9 REPLIES 9
Reply
Message 1 of 10
johnw
868 Views, 9 Replies

Cant get Shortcut Menu (POP menu) to display when its in Partial CUI file?

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

9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: johnw

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

Message 3 of 10
johnw
in reply to: Anonymous

Thanks for your help!

John W
Message 4 of 10
Anonymous
in reply to: johnw

Glad I could help 🙂

Message 5 of 10
johnw
in reply to: Anonymous

If you have a second I was wondering if you knew how to deal with another menu issue. I have 4 toolbar buttons that have snap settings .5, 1, 2, and 4 inches. When you change the setting (let's say 4") the button shows the correct snap setting. When you exit dwg and return the button defaults back to .5 even though snap setting is still 4". Is there a way to get snap setting and then display the proper .bmp image based on what it is when you enter the drawing. Or is there a much easier way I can get button to display current snap setting when first entering drawing?

Thank you,

John
Message 6 of 10
Anonymous
in reply to: johnw

Check your ACADDOC.lsp file or any other startup files for the word

osmode

 and paste what you find back here.

Message 7 of 10
alanjt_
in reply to: Anonymous

A little less legwork...

 

(if (menugroup "CADVR")
  (progn
    (MENUCMD "P0=POP836")
    (MENUCMD "P0=*")
    (MENUCMD "P0=P")
  )
)

 

Message 8 of 10
johnw
in reply to: Anonymous

A follow up to this solution... Where do I add this code? In the macro section of the cui or somewhere else???

Message 9 of 10
johnw
in reply to: Anonymous

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

Message 10 of 10
johnw
in reply to: alanjt_

I tried this and it didn't recognize my POP menu still.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost