PDA

View Full Version : Creating Sub Menu


joseph_z
08-28-2004, 02:30 AM
Hi all,
could any body suggest me ....

HOW TO ADD A SUB MENU BUTTON IN MAIN MENU BUTTON?

for Adding New menu


(sd-add-menu-button "XXXXX"
:parent '("TASK" "SolidDesigner")
:label "XXXXX"
:mapMenu "mlx-pop-up"

(sd-create-menu "mlx-pop-up"
:title "XXXXX"

-----------------------
---------------------------
)

if I want to create a sub menu in "XXXXX" named "XXX"
How can I?

Please suggest me.

Thanks

Joseph

Thom Ivancso
08-28-2004, 04:58 AM
Hello Joseph

Please look at the following link in the intergration kit on how to create menus in OSDM.

C:\Program Files\CoCreate\OSD_Modeling_12.1.3.0\help\Common\documentation\integration_kit\reference\sd_menus.html

Here is a sample that I wrote using your posted information, I hope I understood your request correctly and that this is waht you are trying to create.


(in-package :examples)
(use-package :oli)


(sd-add-menu-button "XXXXX"
:parent '("TASK" "SolidDesigner")
:label "XXXXX"
:mapMenu "mlx-pop-up"
)

(sd-create-menu "mlx-pop-up"
:title "XXXXX"
:contents
'(
(:buttonBox "XXX"
:title "New Buttons"
:buttons(
(action1 :label "Button 1")
(action2 :label "Button 2")
);;end of buttons
);;end of buttonBox "XXX"
(:buttonBox "YYY"
:title "More Buttons"
:buttons(
(action3 :label "Button 3")
(action4 :label "Button 4")
);;end of buttons
);;end of buttonBox "YYY"
);;end of contents
);;end of sd-create-menu "XXXXX"


The action1 - action4 statement is where in your code you would input the name of a command or a dialog menu to be opened or run.

I also edited your post to remove the smilies and added in the tag to format the code area.

Hope this helps

Cheers
Thom

Wolfgang
09-26-2004, 06:25 AM
Thom's code just shows a menu in the main task menu of OSD.

What Joseph was asking for is a submenu in the menu, well if I understood it right.

Have a look to the attached LISP file.

The point is, to use a string as action for the menu. That string is pointing to the submenu.


(sd-create-menu "mlx-pop-up"
....
(action1 :label "Button 1")
("SUBMENU_Z" :label "Sub Menu")
(action2 :label "Button 2")
....
(sd-create-menu "SUBMENU_Z"
:title "sub menu zzz"
...

jkramer
09-26-2004, 10:25 PM
Hi,

talking about this subject....
how can I add an extra button to the "Plot" menu in the Annotation Main Task Bar????
I know by now how to add a main task to the main task bar, but I can't find the trick for a sub menu.
I'm confused by the helpfiles about this subject...

Thanks!
Regards,
Jaap

Markus
09-27-2004, 10:08 PM
Hello Jaap,

it is not possible to add a button to a submenu via the supported IKit functionality.

Sarting with OSDM 13 you will be able to add buttons to any submenus. This new functionality will be available on Windows only.


Markus

joseph_z
11-09-2004, 03:22 AM
Hi to all,
How can I add "Drawing Details" like Drawing No., Material etc. which should automatically when we swith on Annotation mode from Modeling.
Defaulty it is asking Owner, Drawing No., Sheet Scale and Sheet Size. Like wise it should ask further details of a Production Drawing as per Company's Standards.

Thanks to all,

Regards

Joseph

Wolfgang
11-09-2004, 09:23 AM
Hi Joseph,

you can not make the existing UI 'making' to ask for these attributes.

I think you can only create an add on (may be as a dialog which interrupts the create drawing process) to (manually) enter the information needed.

Those data entered can be used via text references (http://www.cocreateusers.org/forum/showthread.php?s=&postid=13782) to fill the title block texts.

Or you can inquire those attributes from the model (may be the owner of the views set of your views of the drawing)


Or.. If you are working with a CoCreate's database you can referrer to the attributes over there, which might be easier.