Automatic Curves Export after simulation
Hi,
I'm currently running simulations on MotionView 2022.1. I have multiple outputs i want to export in .CSV format.
To do that, i select my curve in the plot window and select : export curves.
I do that one by one for each output i need to export.
I there a solution to "automatically" export selection of outputs in a .CSV format after running a simulation ?
Thanks for your help.
Regards.
Thomas
Find more posts tagged with
- I specified the ABF folder path in the script, then I specified the folder path where I want to save my .csv file.
- I ran a loop that scan all the files in the "ABF" folder (the folder must only contain .abf files!) to generate a list of .abf files.
- Next, another loop takes the path to the [i] .abf file and loads it with the READMULVECTORS() function. You can specify the result to extract as an argument (see the OML documentation for this function to use it).
- I used this function a second time to load the TIME vector.
- I created the CSV file.
Hi @Thomas_Bécue,
Unfortunately no, the Jupyter API for MotionView was not introduced until the 2024.1 release.
Is it possible for you to update to the 2025.0 release? There are significant improvements that have been implemented since the 2022.1 version.
Hope this helps!
Adam Reid
Hi !
I found a alternative with a OML script on Compose 2022.1 to generate CSV files from my ABF files
I placed all my .abf files in a folder, from which I want to extract the results in .csv format.
What the OML script does :
Regards,
Thomas
- I specified the ABF folder path in the script, then I specified the folder path where I want to save my .csv file.
- I ran a loop that scan all the files in the "ABF" folder (the folder must only contain .abf files!) to generate a list of .abf files.
- Next, another loop takes the path to the [i] .abf file and loads it with the READMULVECTORS() function. You can specify the result to extract as an argument (see the OML documentation for this function to use it).
- I used this function a second time to load the TIME vector.
- I created the CSV file.
Hi !
I found a alternative with a OML script on Compose 2022.1 to generate CSV files from my ABF files
I placed all my .abf files in a folder, from which I want to extract the results in .csv format.
What the OML script does :
Regards,
Thomas
Hi @Thomas_Bécue,
Yes, this can be accomplished through scripting or, in new versions of MotionView, the use of MotionSolve Jupyter Notebook (recommended).
The scripting method would require the solving and post-processing to be run by either a batch file, Python script, Compose script, etc.
If using batch, you can solve a MDL using the following syntax:
mdl_batch [input_filename] [output_filename] [solver_name] <options>
https://help.altair.com/hwdesktop/hwx/topics/motionview/generating_solver_input_file_solving_frm_mv_mdl_batch_r.htm?zoom_highlight=motionview+batch
For the post-processing, you can write TCL commands to open HyperGraph, plot either a PLT or ABF file, and then export the curves.
Using Altair Compose (how I commonly accomplish this task), you could use the CAE Reader Tool to generate the syntax for extracting the desired curves from a PLT or ABF file, and then add a few more lines for writing to CSV and running the model.
The alternative method, using Jupyter Notebook, can automate the creation, solving, post-processing, and reporting of models.
This topic was originally discussed here:
@Christopher_Fadanelli mentions:
You can directly create a MotionSolve Jupyter Notebook session from the Start Menu in Windows or by invoking the respective script in Linux. After invoking the first Jupyter session the tutorials are being placed under:
The tutorials can also be found in your Altair installation folder:
More details can be found in this second Community article:
Hope this helps!
Adam Reid