# Copyright (c) 2026 JSOL CORPORATION # # This script is released under the MIT License. # See the full license text at: # https://www.jmag-international.com/scriptlibrary/jmag_script_library_mit/ def submitActiveCaseToQueue(anaGroup, tgtStudyNmArray): """Batch execution of specified studies within the analysis group""" job = anaGroup.CreateJob() job.SetValue(u"Title", anaGroup.GetName()) job.SetValue(u"Queued", True) job.SetValue(u"NumOfJobs", 1) job.SetValue(u"CheckConflict", False) job.SetValue(u"IgnoreGeometryError", False) job.SetTargetStudyList(tgtStudyNmArray) # run job # True :Analysis of all cases # False:Run analysis of the current case job.Submit(False) # Wait until the job completes execution job.WaitForFinished() app = designer.GetApplication() anaGroup = app.GetCurrentAnalysisGroup() tgtStudyNmArray = [u"NoLoad", u"Load", u"Demagnetization"] submitActiveCaseToQueue(anaGroup, tgtStudyNmArray) anaGroup.CheckForNewResults()