-
-
May 31, 2023 at 9:49 amshravani.bojjaSubscriber
Dear Ansys Experts,
An equivalent stress results from Ansys Workbench (2023 R1 version) is written to an excel (.csv) using APDL commands as shown below. In doing so, the excel file holds the data in a single column separated by a comma (,). Is it possible to get the data separated into 4 different columns in the .csv file without any manual intervention?
APDL command snippet used to write the results from an array MARRAY to an excel file named Results_VerticalPath_SX: where column 1 (X-coordinate), column 2 (Y-coordinate), column 3 (Z-coordinate) and column 4 (Equivalent stress)
*CFOPEN, Results_VerticalPath_SX,csv
*VWRITE, MARRAY(1,1), MARRAY(1,2,), MARRAY(1,3), MARRAY(1,4)
%i, %g, %g, %g
*CFCLOSLet me know in case of any additinal information. Thanks in advance.
Regards,
Shravani
-
May 31, 2023 at 10:54 amErik KostsonAnsys Employee
Hi
This seems to be an excel related question, as the file you generate from apdl is clearly comma separated.
I would suggest to import the file manually into excel and choose separator as "," - search also the internet:
All the best
Erik
-
May 31, 2023 at 11:38 amshravani.bojjaSubscriber
Hi Erik,
thanks for your reply. So that means that there is no other possibility to get the data into separate columns from ANSYS other than maually changing the settings in excel as specified above?
Best Regards,
Shavani
-
May 31, 2023 at 11:57 amErik KostsonAnsys Employee
Hi
Well you should not need any apdl, if you use workbench. Just define a path, and scope the results to that path and then finally export an excel file (see below).
Search the internet on how to define a path and to scope it to results (it is very easy once the path is defined)
So we do not need apdl (if you use apdl you have saved it in csv format, it is just that your excel needs to be configured, see the search link and the posts there that explain this).
All the best
Erik
-
May 31, 2023 at 12:06 pmshravani.bojjaSubscriber
Hi Erik,
I tried the above mentioned method and it worked as expected, however I require an APDL snippet to retrieve the equivalent stress results at different design points where 10 excel files will be generated at specified design points. What do you suggest in this case?
Regards,
Shravani
-
May 31, 2023 at 1:33 pmManjunatha SiddaramannaSubscriber
Hi Shravani Bojja,
Can you help me how to export chart or Tabular data to csv file through scripting. I am trying to do it without manual intervention for multiple design point study.
Thanks in advance,
Regards,
Manju
-
June 1, 2023 at 7:04 amshravani.bojjaSubscriber
Hi Erik,
Just for your reference, the data can be separated into different columns by using a “;” as shown below. The issue is resolved now, and I can retrieve the data from ANSYS as expected. Thanks for your support.
%i; %g; %g; %g
Best Regards,
Shravani
-
June 1, 2023 at 7:53 amErik KostsonAnsys Employee
Hi
That is good, but as I was saying 'the reason behind this behavior is that CSV files (Comma Separated Values) are splitting data into columns using " , " as separator by default. But in certain countries, the default value used as separator is " ; " instead.'
All the best
Erik
-
-
June 1, 2023 at 7:09 amshravani.bojjaSubscriber
Hi Manjunatha,
I am trying to export the equivalent stress data of a particular path of the model into an excel, for which the data is first stored into an array. Making use of the /copy command you can export the array into an excel or text file stored at a specied path.
Hope your question is answered.
Regards,
Shravani
-
- The topic ‘Post processing Ansys WB results – Writing results to excel sheet’ is closed to new replies.
- Ayuda con Error: “Unable to access the source: EngineeringData”
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- How to apply Compression-only Support?
- Geometric stiffness matrix for solid elements
- How to select the interface delamination surface of a laminate?
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- SMART crack under fatigue conditions, different crack sizes can’t growth
- Frictional No separation contact
-
1281
-
591
-
544
-
524
-
366
© 2024 Copyright ANSYS, Inc. All rights reserved.