TAGGED: ansys-apdl, apdl, apdl-command, export, mwrite
-
-
July 28, 2021 at 11:50 am
solani
SubscriberHello,
in post-processing I created an array. How can I export it to a txt file? Furthermore: is there a possibilty to export two arrays in one file? (like columns in a csv file)
I tried
*MWRITE, avg_temp_vector,C:Usersfoldernamefilename,txt
so far but it does not seem to work.Best regards and thank you in advance,
Ani
July 28, 2021 at 2:23 pmErik Kostson
Ansys EmployeeNever used this - the link has an example that needs to be run from text file and read input from apdl to get it to work.
Hope this helps
Erik
July 29, 2021 at 9:49 amsolani
SubscriberHello Erik thank you, this helped. I solved the problem like this:
! Write to txt file
*CFOPEN, 'filename.txt'
*VWRITE, array_wanted1(1), '; ',array_wanted2(1)
(F,A2,F)
!Format A=String, F=FLoat -> https://web.stanford.edu/class/me200c/tutorial_77/17_format.html
*cfclose
August 16, 2021 at 4:59 pmIKER GOMEZ
Subscriberyou can use C format as well
Write to txt file
*CFOPEN, 'filename.txt'
*VWRITE, array_wanted1(1),array_wanted2(1)
%f; %f
*cfclose
Viewing 3 reply threads- The topic ‘How to write Array to file’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3472
-
1057
-
1051
-
934
-
896
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-