Error Running in Batch Mode
I am attempting to automate some of the processes that I do in Hypermesh by using some TCL scripts. Currently I have created a working TCL script that works when I run it from the Hypermesh interface. When I attempt to run this script from the windows command window I get an error and the script stops running. I have attached the script, and the igs file where the geometry is imported from. I have also included the error that I receive below. Note if you would like to run the script you will need to modify lines 2,8, and the last 4 so that the file path reflects that of your computer.
Error: Data-name is not valid
0
while executing
'*setvalue loadsteps id=1 STATUS=2 OS_SPCID={loadcols 1}'
(file 'auto1.tcl' line 117)
invoked from within
'source auto1.tcl'
End of command file - terminating.
HM exiting with code 1
Thanks in advance for your help.
-Alec
Answers
-
Hi
I think it could be because your hypermesh is in some other profile.
Try changing profile to optistruct in the tcl file.
0 -
Hi Vipin,
Thank you for the reply.
I am confused by your response though.
- Could you elaborate on what you mean by hypermesh being in the another profile, and how could I change the profile to optistruct using tcl commands?
- Its my understanding that these commands are modifying the hypermesh model, and I am only calling optistruct at the end of the script to run the optimization, so why would changing the profile effect if an error is produced?
Thank you for your help!
-Alec
0 -
Hi Alec,
1. you can add this line to your tcl file
hm_framework loaduserprofile OptiStruct ''
2. From the error you got, i think this data name 'OS_SPCID' is something specific to optistruct/emoticons/default_unsure.png' title=':unsure:' />
0 -
Hi Vipin,
Thanks for the reply, sorry for the delayed response. I attempted to implement the command you listed in your previous reply, but it is not recognized as a command. It is strange though because if I type this command in the Hypermesh command window it works perfectly. I think one way around this would be when I call Hypermesh from the Windows command window that it automatically loads OptiStruct as the user profile. What do you think?
Thanks again for all your help and support.
Alec
0 -
Hi Alec,
In that case you can try opening hm like this. So automatically it will change profile.
<altair_home>/hm/bin/win64/hmopengl.exe -uOptiStruct -tcl /home/user/my_script.tcl
0 -
I am getting the same error using hmbatch.exe. How do I resolve it?
0