As of Version 18.4, Magic Model Analyst can export simulation results to a CSV file.

A new configuration, called CSV Export, has been added to export simulation results to a CSV file. CSV files take the following properties:

  • File Name
    The name of the file that the exported results are written into. The path is the same as the project directory (by default). Alternatively, a full path may be specified as D:\ExportedCSVResults.csv
  • Represents
    Specifies the Classifier represented by the Configuration.
  • Value
    Specifies the properties of the Classifier (including nested properties) whose values will be recorded and written to the CSV file.
  • Write At The End
    Records values only once at the end of execution, right before termination, rather than listening and recording value changes during the execution. When Number of runs is more than 1 in the main configuration, the values are recorded once in each iteration.

To export simulation results to a CSV file


  1. Drag the CSV Export Configuration from the toolbox to the Simulation Configuration diagram. 
  2. Double-click the CSV Export Configuration and fill in values for File Name, Represents, and Value from its Specification window. The File Name property is the name of the file in the project's working directory. The Represents property specifies the Classifier represented by the Configuration, and the Values property refers to the values selected which will be written to the exported CSV file. Optionally, you can also set the Write At The End property to record values only once at the end of execution before termination. The following figure shows the parameters of CSV Export configuration.


  3. Set the created CSV export as a tagged value of the executionListeners tag definition of the Simulation Configuration. This step is important for the results to be written to file. See the CSV export configuration below:



  4. Run the simulation and then stop it. The results will be written to the File Name specified in Step 3. See the parameters of CSV Export configuration below: