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
-
[S8553] Script for performing assembly circular pattern copying in the Geometry Editor
The following is an example of a script for performing an assembly circular pattern copy in the Geometry Editor.
-
[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.
-
[S8507] Script to output a result table of nodes with nodal forces above the threshold value
The following is an example of a script that outputs a result table of nodes with nodal forces above the threshold.
-
[S8493] Script to calculate the induced voltage constant Ke from the analysis results and register it in the response value
The following is an example of a script that calculates the induced voltage constant Ke from the analysis results and registers it in the response value.
-
[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.
-
[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.
-
[S8469] Script to register the rotation angle at which torque is maximized as a response value
I want to register the rotation angle at which the torque is maximum in the response value in the script.
-
[S8467] Create a project file in the folder containing the script.
I want to create a project file in the folder where the script is located using a script.
-
[S8458] Script to obtain the coordinates of the vertices of parts
The following is an example of a script that obtains the coordinates of the vertices of parts.
-
[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.
-
[S8447] Script to add a case with modified design parameters including geometry dimensions.
I want to add a case and change design parameters including geometry dimensions with a script.
-
[S8441] Script for performing FFT on torque waveforms and extracting the maximum amplitude from each frequency component
The following is an example of a script that performs FFT on torque waveforms and extracts the maximum amplitude from each frequency component.
-
[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.
-
[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.
-
[S8426] Script to create response data by determining duplicates and create response graphs
The following is an example of a script that checks for duplicates, creates response data, and creates a response graph.
-
[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.
-
[S8406] Script to launch multiple JMAG-Designers
The following is an example of a script that launches multiple JMAG-Designer instances.
-
[S8401] Script for specifying parts by coordinates and setting conditions
The following is an example of a script that specifies parts by coordinates and sets conditions.
-
[S8389] Script to obtain vertex coordinates from the Geometry Editor
The following is an example of a script that obtains the coordinates of vertices in the Geometry Editor.
-
[S8384] Script to check the number of jobs that have not been completed in JMAG-Scheduler
The following is an example of a script for checking the number of jobs that have not been completed in JMAG-Scheduler.


