Jump to content
Aditya Palsule

calling tpl file in tcl script for using in hyperview

Recommended Posts

Hi,

it is my lazy way to look for wrapping gui commands

open a C:/sample.tpl file in hyperview:

rename tk_getOpenFile tk_getOpenFile_Old
proc tk_getOpenFile args {return C:/sample.tpl}
hw::ExecuteMenuItem 188
.guiMainWindow.statusbar.bbox.bapply invoke
.guiMainWindow.statusbar.bbox.bcancel invoke
rename tk_getOpenFile ""
rename tk_getOpenFile_Old tk_getOpenFile

 

Share this post


Link to post
Share on other sites
On 5/16/2017 at 0:07 PM, tinh said:

Hi,

it is my lazy way to look for wrapping gui commands

open a C:/sample.tpl file in hyperview:


rename tk_getOpenFile tk_getOpenFile_Old
proc tk_getOpenFile args {return C:/sample.tpl}
hw::ExecuteMenuItem 188
.guiMainWindow.statusbar.bbox.bapply invoke
.guiMainWindow.statusbar.bbox.bcancel invoke
rename tk_getOpenFile ""
rename tk_getOpenFile_Old tk_getOpenFile

 

Hello tinh,

Please can you help to get this tcl script to work on HW13.0

Currently unable to run this on HW13.0.

Currently using in .cmd file

pushd C:\Program Files\Altair\13.0.110\hw\bin\win64
start hw.exe -clientconfig hwplot.dat -tcl Z:\sample.tcl

 

and in sample.tcl this data:

 

rename tk_getOpenFile tk_getOpenFile_Old
proc tk_getOpenFile args {return Z:/TowingTpl.tpl}
hw::ExecuteMenuItem 188
.guiMainWindow.statusbar.bbox.bapply invoke
.guiMainWindow.statusbar.bbox.bcancel invoke
rename tk_getOpenFile ""
rename tk_getOpenFile_Old tk_getOpenFile

 

Please can you able to make this work.

Thanks

Share this post


Link to post
Share on other sites
On 7/19/2017 at 7:38 PM, tinh said:

Hi, 

I am sorry that it did not work. I will check it and inform you.

It may take a bit long time because I don't use hyperview much :ph34r:

Thank you tinh for your reply.

No problem Tinh.

Share this post


Link to post
Share on other sites

Hi @Pradeep

I found it, 

You have to use an HW Desktop class named "hwIReportTemplate"

Looking for its usage in Reference Guide>Hyperworks Desktop,

You have to set parameter pointing to your *.tpl file then invoke hwIReportTemplateApply method

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...