I have a .h3d Result file from Optistruct run. I would like to extract model information from it and I think it is not possible directly with OML.
For example, I have some element set definitions in the calculation model and I would like to get those element IDs belonging to a certain set.
Now I have already a tcl file which does the job and puts the IDs into a listvariable ContentList. Now I am trying to call that tcl script from Compose
with:
setid = 100; [status,errormessage]=exporttotcl (setid,'setid') [status,errormessage]=evaltclfile('D:/get_sets.tcl') [omlvariablename,status,errormessage]=gettclvar ('ContentList')
so I want to pass the set id 100, which the element set I am interested in, into Tcl, run the script and get the tcl List containing the IDs back to OML.
I simply get:
errormessage = invalid command name "hwi"
apparently I am running tcl, but it is not the one connecting to the Hyperworks/Hyperview? If I use a simple code snippet in standard Tcl:
puts $setid set ContentList {20 13 40} lappend ContentList $setid
I can see that the communication works. Tcl script will see the variable setid and OML will get the ContentList in return but not if I am trying to do something with API specific commands.
Furthermore, I think that in the end I want to execute the Hyperview in Batch-mode without GUI, so I probably need to execute the system command for batch-execution and not evaltclfile. I am wondering if, in that case, I can even pass the variable data back and forth to the tcl. Does anyone has experience doing something like this?