Running a script using tcl\tk

Can we run a script using tcl\tk script so it will provide all Hypemesh api's without opening Hypermesh.
Or can we import package related to Hypermesh script without opening hypermesh or running tool from command prompt.

Hi Jouher,
How it can be done using batch file please let me know.
Thanks and regards
Vikas Kumar

Hi tinh,
While loading any .dll file from hyperworks tclsh stops working and giving error.
I am using command load 'C:/Program Files/Altair/14.0/hm/bin/win64/hwatnetworkdiagram_tcl.dll' and i am using tclsh 8.6 version.
Thanks

Hi Vikas,
Create a batch file by Following this procedure:
d: (drive where Altair HM is installed)
Altair\14.0\hw\tcl\tcl8.5.9\win64\bin\wish85 \\PATHofTCL\Main_file.tcl
Thus it will look like
d:
Altair\14.0\hw\tcl\tcl8.5.9\win64\bin\wish85 \\XYZ\Main_file.tcl

Hi Jouher,
After that how to call .batch file and what will be content of batch file.
I have given this but it's not working i am running .bat file by using command 'exec batFile.bat' in tclsh prompt.
C:\Program Files\Altair\13.0\hw\tcl\tcl8.5.9\win64\bin\wish85\\D:\Vikas\Backup\TCL_TK\checkExit.tcl
It is showing
Thanks

Only in C directory altair path has space but i kept it like
'C:/Program Files/Altair/13.0/hw/tcl/tcl8.5.9/win64/bin/wish85.exe' 'D:/Vikas/Backup/TCL_TK/checkExit.tcl'
still it's not working

A simple code ..
wm protocol . WM_DELETE_WINDOW chk_exit
proc chk_exit {} {
set ans [tk_messageBox -type yesno -icon question -message 'Are you sure you want to quit?']
if { $ans != 'no' } {
exit
}
};# chk_exit

It is showing
But file exist at given location .
My batch file I am attaching with this.

Hi tinh,
i have uploade batch file too you can see there is no such character available

Hi Tinh,
It's working if i am changing format of directory name to
'C:\Program Files\Altair\13.0\hw\tcl\tcl8.5.9\win64\bin\wish85.exe' 'D:\Vikas\Backup\TCL_TK\checkExit.tcl'
instead of 'forwad slash ( / )' i am using 'Back slash (\)' .
Thanks for your support

Hi Tinh,
Now i am trying to run same .tcl file as file -> Run -> TCL\TK Script in HM by using this command
'C:\Program Files\Altair\13.0\hm\bin\win64\hmopengl.exe' 'D:\Vikas\Backup\TCL_TK\checkExit.tcl'
but it's only opening the Hypermesh. And not running the checkExit.tcl file.
tinh or jouhar could you help me out to run the script.
Regards,
Vikas

Hi tinh,
Thanks for your support now it's working.
Thanks alot.
Best regards,
Vikas

Hi tinh,
May i get some more information on this.
How you identified that there will be '-tcl' in between please if it is possible explain or share the link i will go through
Regards
Vikas Kumar
Well, this question is much more difficult than your previous question !
I know it for really long time ago (maybe version 8), so looking for it again was so tough /emoticons/default_wacko.png' title=':wacko:' />
You should spend your time to read all hm help documents!
in hm help > altair help home > hyperworks desktop applications > getting started >
hyperworks desktop overview > startup procedures and customization > starting hyperworks desktop application > hypermesh startup options
I am not sure. Maybe we can load some *.dll file containing hm api into tcl interp
try command 'info loaded' to see them
Instead, we can open hm in background so you don't see its GUI but all functions are available.