Tcl for export session file .sés
Answers
-
I am not familiar with .ses format but , assuming you are exporting from HyperMesh, when you do it manually what commands show in the command_#.tcl file?
0 -
no one otherwise I didn't ask questions ????Ben Buchanan said:I am not familiar with .ses format but , assuming you are exporting from HyperMesh, when you do it manually what commands show in the command_#.tcl file?
0 -
Giovanni Capasso said:
no one otherwise I didn't ask questions ????
Please tell me the process you use to do it manually.
0 -
1) create Elm set
2) tools -> set browser -> export set ( .session file )
perhaps the right question was: how to export a table in “.ses” format with .Tcl commands
0 -
Giovanni Capasso said:
1) create Elm set
2) tools -> set browser -> export set ( .session file )
perhaps the right question was: how to export a table in “.ses” format with .Tcl commands
Looks like it doesn't exist. I will request it and see if there is a workaround.
0 -
the solution exists to export table in format separated by a symbol of your choice. it seems too strange to me that there is no solution for export in .ses Patran format. if you can find anything i am grateful0
-
Giovanni Capasso said:
the solution exists to export table in format separated by a symbol of your choice. it seems too strange to me that there is no solution for export in .ses Patran format. if you can find anything i am grateful
There is a tcl command to export table? Please share.
0 -
you find everything in other cases that I asked on the net.0
-
I have requested that a hm api be created to export a .ses file. So, hopefully, in the future you will be able to do this with one command. Otherwise you can certainly write a file with tcl in whatever format you want. It just may be a little tedious. The basic commands will still be open, puts and close. Each new puts would add another line to the file. Something like this:
*createmarkpanel sets 1
set setList [hm_getmark sets 1]
set fp [open $outFile w];
puts $fp "\$# Started creation of session file $outFile at 10-Mar-23 14:03:05"
puts $fp "\$# Exported by: Altair HyperMesh 2022.2.0.27"
puts $fp "sys_poll_option( 2 )"
foreach set $setList {
set setName [hm_getvalue set id=$set dataname=name]
puts $fp "ga_group_create( \"$setName\" )"
puts $fp "ga_group_entity_add( \"$setName\", \" Element [hm_getvalue set id=$set dataname=elementids]\" )"
puts $fp "sys_poll_option( 0 )"
}
puts $fp "\$# Stopped creation of session file exportSimple.ses at 10-Mar-23 14:12:33"
close $fpYou will need to set the outFile variable with the output file and if your set is very long will need to create line breaks but this is the basic idea.
0 -
The ExportToSession procedure in the default_component.tcl looks like it does what you want.
It is in the installation directory \hwdesktop\hm\scripts\browser.0 -
Hey Giovanni,
just stumbling into this conversation and wondering what is missing from the HyperWorks package which leads you to the need of workign with Patran session file
Let me know and hopefully we can provide a was better shortcut to your workflow.
Ciao
Michele
0 -
In my opinion, nothing is missing! Even if the versions up to 2019.1 are lacking in terms of extraction when compared to the simplicity ( only this ) of other famous competitors.Michele Macchioni said:Hey Giovanni,
just stumbling into this conversation and wondering what is missing from the HyperWorks package which leads you to the need of workign with Patran session file
Let me know and hopefully we can provide a was better shortcut to your workflow.
Ciao
Michele
The demand is the result of work necessities that still impose an old way of working based, pardon the repetition, on other software.
0