I'm running a simple tensile test simulation for a single element. Under Results I made a Chart object with Stress vs Strain, which can be manually exported to a csv file by right clicking on the table. The trouble arises from the parametrization. I've parametrized temperature in Workbench so that the same simulation is run once for each temperature. However, the results are not saved for each substep for each design point, and it would be tedious to have to open Mechanical, re-solve, and export the Chart as many times as I have temperatures.

Ideally there would be a macro that runs every time the simulation is solved in Mechanical, exporting the Chart's table to a csv (appending it if possible so that the data for all temperatures is in the same file).

Is there any way to do this? I would imagine it could be achieved with JavaScript in Mechanical (for which I cannot find any documentation).

  • $\begingroup$ How many rows in the parameter table are we talking about here? $\endgroup$ Mar 2, 2016 at 7:10
  • $\begingroup$ You could use the Ansys Parametric Design Language (APDL) to accomplish what you need, e.g. look at the *VWRITE command. I guess for this you have to abandon the comfort of Workbench. $\endgroup$
    – rozsasarpi
    Aug 26, 2017 at 13:11

2 Answers 2


There are several options for doing this:

  1. If there are only a few values to be saved per design point, you could use 'output parameters'.
  2. If there is a lot of data to be saved, the report generator may be useful. Some information can be found here: Working with Project Reports
  3. An APDL snippet can be used in the results* tree. Some information here: Saving Mechanical APDL Plots in a Design Study
  4. IronPython may be used. This requires you are an expert in Ansys and know programming well.

See also Path Plots and Automated Post Processing in MADPL and Workbench

*Be careful to place the snippet in the results section of the model, otherwise it will run before in stead of after solving.


There is an option to retain all the solutions. Look in the parameter table for a check box. After you have it checked for all design points, run the simulation and it will create multiple project files of the form:


open each one to get the results. Or, find all the .mechdb files, rename them as .mechdat and import them into a single workbench project file.

Of course if you are savvy (which I am not) you can use IronPython scripting to drive the export of the csv files from each project.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.