Valued Contributor
Posts: 86
Registered: ‎07-22-2006
Message 1 of 3 (93 Views)

Urgent:- How to create Submenu

93 Views, 2 Replies
11-30-2006 02:26 AM
Dear All,
Plz any body tell me how to create a submenu by using PopMenu class. I could not found any good tutorial to learn how to create menus and submenu. Some how i m able to create menu but could not found how to add submenu in it. I aslo want to set events on them and enable and disable the items.
Plz Urgent. thanks....
Valued Contributor
Posts: 67
Registered: ‎09-12-2006
Message 2 of 3 (93 Views)

Re: Urgent:- How to create Submenu

11-30-2006 04:13 AM in reply to: aslam
Here dimensionMenu points to the AcadPopupMenu representing the Dimension Menu.
The code adds a submenu (camSubMenu) and several menu entries into it. As for the events, you'll have to play with the items returned by the AddMenuItem methods.

AcadPopupMenu camSubMenu = dimensionMenu.AddSubMenu(dimensionMenu.Count, "CAM Dimensions");
camSubMenu.AddMenuItem(dimensionMenu.Count, "Square", "SQUAREDIM ");
camSubMenu.AddMenuItem(dimensionMenu.Count, "Sphere Radius", "SPHERERADIUS ");
camSubMenu.AddMenuItem(dimensionMenu.Count, "Sphere Diameter", "SPHEREDIAMETER ");
camSubMenu.AddMenuItem(dimensionMenu.Count, "Key", "KEYDIM ");
camSubMenu.AddMenuItem(dimensionMenu.Count, "Leader", "LEADERDIM ");
Valued Contributor
Posts: 86
Registered: ‎07-22-2006
Message 3 of 3 (93 Views)

Re: Urgent:- How to create Submenu

12-01-2006 01:13 AM in reply to: aslam
Hi pavlos,
Very thanks for help. It is working. Now two more question plz help.

1. How to assign shortcut key to menuitems. like CTRL+SHIFT+T.
2. How to set image to menu item.
3. I tried to give a name like "Ho&spital". Here 's' should become the "Hot Key". But it did not work. Plz help.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.