Tcl for export table like .ses file

Unknown
edited June 2023 in Community Q&A

Is possible write e script in HM to export a table in .ses file format 

Answers

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    edited June 2023

    Hello Giovanni,

     

    if .ses is an ascii format, for sure you can use tcl for writing it. Then it depends if the format is free or fixed. If you have to respect a given format, then you need to format your command accordingly.

    Below are the regular commands we recommend for writing into an ASCII file:

     

    Command

    Effect

    set fIn [open $file w]

    Open the file to overwrite it

    set fIn [open $file a]

    Open the file to write it in append mode

    puts $fIn $string

    Writes the string in the file

    close $fIn

    Close the file

    format %format $string

    Force the format for a given string

     

    For the format command, here is an example of use:

    image