TAGGED: ansys-apdl, apdl, apdl-command, export, mwrite
-
-
July 28, 2021 at 11:50 amsolaniSubscriber
Hello,
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 KostsonAnsys 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 amsolaniSubscriberHello 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 GOMEZSubscriberyou 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 discussions- Error when opening saved Workbench project
- At least one body has been found to have only 1 element in at least 2 directions
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
- Image to file in Mechanical is bugged and does not show text
Top Contributors-
1882
-
802
-
599
-
591
-
366
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.
-