Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › Write the parameter value to a text file › Reply To: Write the parameter value to a text file
I'm sorry, but none of this makes sense to me if you really want to use the TIME command, not the original commands, or Dave Looman's last comments. The TIME command sets the end time of the load step as a solution setting before running the solution:
https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v241/en/ans_cmd/Hlp_C_TIME.html
It does not make sense to keep resetting the load step end time, without issuing a SOLVE after each iteration. It's just going to use the last TIME command for the next SOLVE command.
What are you really trying to do? Do you just want to print out all the load step end times? Or maybe all the result set end times? Do the following in a command snippet under Solution:
/post1
*get,nrsets,active,0,set,nset   ! Only works when result file is present. Does not work when results are stored to database
*cfopen,timeout,txt
*do,rset,1,nrsets
set,,,,,,,rset
*get,Lstep,active,0,set,lstp
*get,Sbstep,active,0,set,sbst
*get,time,active,0,set,time
*vwrite,Lstep
Loadstep %4I
*vwrite,Sbstep
Substep %4I
*vwrite,rset
Cumulative Substep %5I
*vwrite,time
Time %13.5E
*enddo
*cfclos
Â