[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.

import subprocess

app = designer.GetApplication()

# Specify the execution folder

WorkDir = u"D:/DATA"

# Specify the installation folder for JMAG-Designer

InsDir = u"C:/Program Files/JMAG-Designer24.1"

# Exporting JCF files

app.GetModel(0).GetStudy(0).WriteMeshJcf(WorkDir + u"/test.jcf")

# Creating commands

Command = f'"{InsDir}/scheduler.exe" "{WorkDir}/test.jcf" --workdir "{WorkDir}"'

# Executing commands

subprocess.Popen(Command)

How to use script file

Use the JMAG Script Library after reading and agreeing to the following terms of use.