Jump to content

Recommended Posts

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

Drawing3.igs

Auto1_V2.tcl

Share this post


Link to post
Share on other sites

Hi Vipin, 

 

Thank you for the reply. 

 

I am confused by your response though.

  1. 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?
  2. 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

Share this post


Link to post
Share on other sites

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_SPCIDis something specific to optistruct:unsure:

tinh likes this

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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...