Users can operate almost every feature in JMAG through scripts. Although the JMAG website previously restricted access to sample scripts to authenticated users, we would now like to make this library available to everyone.
Most of the sample scripts written in Python are easy to use with some general programming knowledge. In addition, we are also releasing instructional materials that describe various scripting methods alongside usage examples. These materials should give even those new to JMAG confidence to use the scripting tools to easily automate and streamline analyses and design processes. Going forward, we will continue to enhance this library so that everyone can realize more flexible workflows through scripts.
JMAG Script Library
-
[S8376] Script to export csv with model ID, study ID and case number
I want to specify model ID, study ID and case number in a script and export the results in csv.
-
[S8374] Script for specifying part colors and grouping parts
The following is an example of a script that specifies part colors and performs grouping.
-
[S8369] Script for performing Boolean operations by specifying part names in the Geometry Editor
The following is an example of a script that performs Boolean operations on specified parts using the Geometry Editor.
-
[S8366] Script for manipulating the perspective of the model display
The following is an example of a script that manipulates the perspective of the model display.
-
[S8356] Script for running analysis by specifying a folder using JMAG-Scheduler
The following is an example of a script that uses JMAG-Scheduler to specify a folder and execute analysis.Open in JMAG-Designer the model that contains the study to be calculated using JMAG-Scheduler in advance, and then run it from the script editor.
-
[S8352] Script to export the results of any case from multiple cases to a single CSV file
The following is an example of a script that writes the results of any case from multiple cases to a single CSV file.
-
[S8350] Script for importing CSV files with conditions, circuits, and materials
The following is an example of a script that reads CSV files on conditions, circuits, and materials.
-
[S8346] Script to output the results of multiple case probes in a batch to a csv file
The following is an example of a script that outputs the results of a multi-case probe in a batch to a csv file.
-
[S8341] Script to get the maximum flux density of a contour plot for any part
The following is an example script to obtain the maximum flux density of a contour plot on an arbitrary part.
-
[S8339] Script to add cases with different current amplitude values and output the results of each case to a csv file
The following is an example script that adds cases with different current amplitude values and outputs the results of each case to a csv file.
-
[S8333] Script to FFT and output csv
I want to automate the process of performing FFT on the results and outputting them as a CSV file.
-
[S8332] Script to add cases and specify the direction of magnetization for each
The following is an example of a script that adds three cases and sets the direction of the reference axis for the magnetization direction for each.
-
[S8329] Script to create a sectiongraph and export the results to a CSV file
The following is an example of a script to export a CSV file after setting up a new arc graph from the displayed model using “Results” > ‘Section’ > “Arbitrary Region” > “New Arc ...”.
-
[D0040] Contact Resistance between Stator Core and Case
Contact Resistance between Stator Core and Case
-
[D0039] Set Cooling (Natural Convection)
Set Cooling by Natural Convection
-
[D0038] Contact Resistance between Magnet and Rotor Core
Set Contact Heat Resistance between Magnet and Rotor Core
-
[D0037] Set Cooling (Forced Convection)
Set Cooling by Forced Convection
-
[D0036] Heat Transfer at Airgap
Set Heat Transfer at Airgap
-
[D0035] Vibration Evaluation with Transfer Function
Evaluate the vibration of an observation point using the transfer function.
-
[D0032] Setup study for transfer function creation
Set up a frequency analysis study for transfer function creation.


