create new button at main menu in hyperworks
Hi,
I am trying to load a new mvw file to create a new item in main menu in hyperview10.0,
but while trying to load the file i am getting the below error...
1 Error: Did not find EndModelDefaults corresponding to BeginModelDefaults
at line 393. Default values will be used.
and not creating the menu item...
the mvw file will contain the code as below
*Id('HyperWorks v10.0')
{hwdesktop=1}
*BeginDefaults()
{machtype = sysid()}
{if (machtype != 'windows')}
*DefaultFileAccessFromWorkingDirectory(true)
{endif}
*ClosestTimeSync(On)
// 2D plot client preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_plot.mvw'}
// 3D plot client preferences
{'include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_plot3d.mvw'}
// fe-pre client preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_fepre.mvw'}
// post client preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_post.mvw'}
// mbd client preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_mbd.mvw'}
// generic tools preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_tools.mvw'}
// hw application preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_app.mvw'}
*BeginMenu(dummy, 'NEWITEM')
*MenuItem(dummy, 'ITEM', TCL, 'D:/POST-HM10/Post-Processing/Scripts/item_name.tcl')
*EndMenu()
*EndDefaults()
// palette preferences
{include getenv('ALTAIR_HOME') + '/hw/prefinc/preferences_palette.mvw'}
same mvw file is opening in hm8 and hm9.0
Can any body help me in solving this issue...
Regards
Ramu B
Answers
-
Hi all,
I'm new to this forum. I could able to add custom menu item on Hyperview. But, I want to know how to add Custom ToolBar with button assigning a .tclscript file.
Anyone's help would be greatly appreciated.
I tried it this way that is available in help (http://www.altairhyperworks.com/hwhelp/Altair/hw13.0/help/fw/fw.htm?_begintoolbar_.htm)
*BeginToolbar('myconfig')
*ToolbarItem('Load Model')
*ToolbarItem('Contour')
*ToolbarItem('Mask')
*EndToolbar()
Thanking you..
NK
0