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

MENUCMD problem with pulldowns

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Jedimaster
599 Views, 1 Reply

MENUCMD problem with pulldowns

This has been a issue for quite a few years. The raster image pulldown disappears. The cui is still loaded but the Image tab does not show up in the menubar. The following routine loads the Raster menu is not loaded. Then looks at the menubar to see if the image tab shows up. If it does not see the image tab it will try to load it with the MENUCMD. Basically (menucmd "p14=+AeciIbUi.pop7"). However, nothing pops up. I can get this to work with other tabs just not image.

 

 

(vl-load-com)
;;Check operating system
(if (vl-string-search "x86" (vla-get-path (vlax-get-acad-object)))
	(setq ProductKey (vl-string-subst "SOFTWARE\\Wow6432Node" "SOFTWARE" (strcase (vlax-product-key))))
	(setq ProductKey (vlax-product-key))
)
;;Find menufile load once found
(setq RasterLocation(vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" ProductKey "\\Add-Ons\\RasterDesign") "Location"))
(if RasterLocation
	(progn
		(setq RasterMenu (findfile (strcat RasterLocation "UserDataCache\\Support\\AecCo.cui")))
		(if (not RasterMenu)(setq RasterMenu (findfile (strcat RasterLocation "UserDataCache\\Support\\AecCo.cuix"))))
		(if (not RasterMenu)(progn (princ "\nNo Menu Found!\n")(exit)))
		(if (and (not (menugroup "RASTERDESIGN"))(not (menugroup "AUTOCADRASTERDESIGN")))(command "MENULOAD" RasterMenu))
		
	)
)
;;Check menubar
(setq barlist nil)
(vlax-for n (vla-get-MenuBar (vlax-get-acad-object)) (setq barlist (append barlist (list (strcase (vla-get-NameNoMnemonic n))) )))
;;Show Image tab
(setq ccmd (strcat "p" (itoa (+ (length barlist) 1)) "=+AeciIbUi.pop7"))
(if (and (or (menugroup "RASTERDESIGN")(menugroup "AUTOCADRASTERDESIGN"))(not (member "IMAGE" barlist)))(menucmd ccmd))

 

1 REPLY 1
Message 2 of 2
Jedimaster
in reply to: Jedimaster

Problem solved

(menucmd (strcat "p" (itoa (+ (vla-get-count (vla-get-MenuBar (vlax-get-acad-object))) 1)) "=+AUTOCADRASTERDESIGN.pop7"))

instead of

(menucmd (strcat "p" (itoa (+ (vla-get-count (vla-get-MenuBar (vlax-get-acad-object))) 1))  "=+AeciIbUi.pop7"))

evidently it is looking for menugroup on file name.

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

Post to forums  

Autodesk Design & Make Report

”Boost