🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Tcl for export session file .sés

User: "Jonny_CAP"
Altair Community Member
Updated by unknown

Could you tell me the .tcl command to export a table in .ses format ( patran)?! 

i can't find it anywhere.  Thank you

Find more posts tagged with

Sort by:
1 - 12 of 121
    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    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?

    User: "Jonny_CAP"
    Altair Community Member
    OP
    Updated by unknown

    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?

    no one otherwise I didn't ask questions ????
    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    no one otherwise I didn't ask questions ????

    Please tell me the process you use to do it manually.

    User: "Jonny_CAP"
    Altair Community Member
    OP
    Updated by unknown
    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

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    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.

    User: "Jonny_CAP"
    Altair Community Member
    OP
    Updated by unknown
    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
    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    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.

     

    User: "Jonny_CAP"
    Altair Community Member
    OP
    Updated by unknown
    you find everything in other cases that I asked on the net.
    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    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.

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    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.

    User: "Michele Macchioni"
    Altair Employee
    Updated by Michele Macchioni

    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

    User: "Jonny_CAP"
    Altair Community Member
    OP
    Updated by Jonny_CAP

    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

    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.

    The demand is the result of work necessities that still impose an old way of working based, pardon the repetition, on other software.