How I can write I O result parameter scalar values in the same output .txt file (ASCII file)?

Yann_Le_Floch
Yann_Le_Floch
Altair Employee
edited November 2021 in Altair HyperWorks

The scalar values of I/O parameters can be written in a txt file as follows:

1Collect the values of the I/O parameters.
To collect for instance two I/O parameters in a table, you can proceed as follows: values= [ScalarResult['CurrentValueInOutParameter_1'].value, ScalarResult['CurrentValueInOutParameter_2'].value ]
2

Write the parameter values in a file. You can use the following command lines: f=open('test.txt','w')

for i in values:
f.write(str(i))

f.close()