Starting a Solver automatically
Hey guys,
is it somehow possible to start and execute an OptiStruct Solver Run automatically by a .tcl command or script?
The aim of this is to create the .h3d-File and .res-File automatically without pressing any buttons.
I'm working with the 2017.2 student version of HyperWorks.
Kind regards and thanks in advance,
Simon
Answers
-
I answered this in a certain topic. Please search it first
0 -
Hey tinh,
I've checked the other topic, but an error is still occuring.
This is the part of my code where I'm trying to run the simulation:
*createstringarray 1 'CONNECTORS_SKIP '
hm_answernext yes
*feoutputwithdata 'C:/Program Files/Altair/2017.2-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/Simon/Desktop/CAO/test.fem' 1 0 2 1 1
exec 'C:/Program Files /Altair/2017.2-edu/hwsolvers/scripts/optistruct.bat' 'C:/Users/Simon/Desktop/CAO/test.fem' -analysis
*writeh3dwithoptions 'C:/Users/Simon/Desktop/CAO/test.h3d' 1 4The test.fem is written and saved into the desired folder, but an error is occuring in the next line.
Could you help me out there? I'm using Windows 10.
Besides, I'm aiming for writing a .res-file. Do you know how this works?
Kind regards and thanks in advance,
Simon
0 -
I don't have education version.
Try searching file optistruct.bat by window search box
0 -
I know where it is located and I'm pretty sure to have chosen the right path.
Any other idea why it doesnt work?
0 -
I don't believe you
Sure I believe computer, because the error says 'no such file or directory', obviously
Try again and again
0 -
As you can see on the screenshot, this is the path indicated by windows.
I improved my code to:
*createstringarray 1 'CONNECTORS_SKIP '
hm_answernext yes
*feoutputwithdata 'C:/Program Files/Altair/2017.2-edu/templates/feoutput/optistruct/optistruct' 'C:/Users/Simon/Desktop/CAO/test.fem' 1 0 2 1 1
'C:/Program Files /Altair/2017.2-edu/hwsolvers/scripts/optistruct.bat' 'C:/Users/Simon/Desktop/CAO/test.fem' -analysisNow an error is occuring saying that the last line is an invalid command name.
0 -
Certainly, it needs exec command
The file optistruct.bat is existing
That means the path you typed in is wrong
Please check it.
0 -
Hey tinh,
it finally worked out. Thanks for your patience and help.
Simon
0