Page 1 of 1

Use of "menucmd"

Posted: Fri Aug 17, 2001 11:09 am
by ordiales
Another problem in intellicad is the use of "menucmd".

To automaticly load a "menu" in Autocad I use

(command "menuload" "mimenu")
and
(menucmd "p9=+mimenu.pop1")

In that case I add a new popup in Autocad menus.

BUT IN INTELLICAD... menuload works fine but... menucmd can't add mi popup menu.

other variants like (menucmd "p9=mimenu.pop1") etc... doesn't works...

what is the right algorith to add popup menus to Intellicad upper menus from LISP?

Thanks in advance...

Posted: Fri Aug 17, 2001 11:44 pm
by avaernes
I can not find any reference to the "+" or "-" menucmd values in the Intellicad documentation. Appearently only changing the state of a menu item is supported (correct me anyone if I am wrong).
Forgive my stupid question, but if you can successfully load the main menu, why is the submenu item missing in the first place?

Posted: Sat Aug 18, 2001 7:43 am
by ordiales
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by avaernes:
<B>I can not find any reference to the "+" or "-" menucmd values in the Intellicad documentation. Appearently only changing the state of a menu item is supported (correct me anyone if I am wrong).
Forgive my stupid question, but if you can successfully load the main menu, why is the submenu item missing in the first place?</B><HR></BLOCKQUOTE>

When I load a menu with "menuload" this action ONLY shows automaticly "toolbars" but no one of the POP menus are showed.
(This is the same in Autocad).

When I want ADD and SHOW!!! a new upper POP menu from my loaded menu I must use "menucmd" with this sintax:

(menucmd "p9=+mimenu.pop1")

in that case I'm saying:

"I want insert a new popup menu at position 9 and his description came from menu "mimenu" (already loaded) in the section "pop1".

like

***MENUGROUP=mimenu
***pop1
[Ejemplo]
[Zoom Interventana](c:zoomv)

***pop2

[...]

BUT It doesn't works in Intellicad as Autocad does.

WORSE!!! using (menucmd "p9=mimenu.pop1") doesn't works... so... finally... I CAN'T SHOWS ANY POPUP MENU from a LISP Routine in Intellicad...

:-(

Any Idea... workarround... etc... ???

Posted: Mon Aug 20, 2001 2:01 am
by avaernes
I have tested menuload and can't make it work either. Since the +/- values of (menucmd) don't seem to be supported, menuload should load the pop menu also, not just the toolbars.
I also believe it is a bug that it doesn't. If I try to load an add-on menu (.mnu/mns) with FILEDIA = 0, the items are added to the registry as menu items. These entries are, however, corrupted or empty. They wouldn't be if this command was working properly.
Another strange thing is that it apparently can be done from outside the UI. If you have a PE version, you will see that the ImageEnabler is an add-on menu, loaded automatically on startup. This may well be hard-coded in the program, but the methods for doing so should have been accessible from lisp also.

BTW, why do you need to automate this in the first place. After all, anyone who can load a lisp routine can also load your pop menu from the Customize dialog.