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
-
[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 ...”.
-
[S8545] Script to set concentrated load conditions at nodes on a circle
The following is an example of a script for setting concentrated load conditions at nodes on a circle.
-
[S8434] Script for selecting elements by circular selection and writing out the result table.
I want to use a script to select elements by circular selection and write out the result table.
-
[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.
-
[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.
-
[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.
-
[S8451] Script to create probes in 1deg increments in the circumferential direction
I want to create probes in 1deg increments in the circumferential direction in a script.
-
[S8415] Script to display the results of section graphs for all cases in a single graph and output CSV files.
The following is an example of a script that displays the results of section graphs for all cases in a single graph and outputs a CSV file.
-
[D0001] Add magnetic field strength contour
Add magnetic field strength contour definition to the current study.
-
[S8477] Script for calculating and graphing induced voltage (dφ/dt)
I want to calculate the induced voltage (dφ/dt) using a script and display a graph.
-
[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.
-
[S8436] Script to acquire set value information for [Current Source (1 Terminal)] and [Electric Potential Source (1 Terminal)].
I want to get the setting value information of [Current Source (1 Terminal)] or [Electric Potential Source (1 Terminal)] by a script.
-
[S8481] Script for placing the starting point of flux line rendering circumferentially in a 3D model
The following is an example of a script that places the starting point of the flux line rendering in a circular direction in a 3D model.
-
[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.
-
[S8344] Script to obtain flux values for current conditions
The following is an example of a script that retrieves the value of the magnetic flux in the current condition from the results of a magnetic field static analysis.
-
[S8372] Get area or volume in script
Obtain area/volume of a part or group of parts


