TCL Script doesn't run correctly in Hypermesh
Hi,
I have written a script in TCL that changes the material properties using an automatic number generator. The script works when I write it into the console, (The interpreter at the bottom of the page, not sure of the correct name). But when I run the script using the run TCL script button nothing happens. I have attached the script. It changes the material properties of a MAT9ORT card. Can someone take a look at my script and give me some advice on how it can be changed to run correctly.
I have also attached my hm file for which I am attempting to change the material properties.
Kind Regards,
Laurence Maskell
Find more posts tagged with
Hi,
Thank you! I made that alteration and the script is functioning partially correctly. The material properties are changing in accordance with the random number generator, but I get an error saying Error 0. (see attached) When I press ok the material properties are changed but this error message is a problem, how can I remove it?
Kind Regards,
Laurence
Hi,
Please remove all return statements, it is not required.
return is used to return values when using procedures, in this case it will exit the program.