Find more posts tagged with
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 $fp
You 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.
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.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.
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?