# 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/ import os app = designer.GetApplication() def getFolderpathOfOpenedProjectFile(): """Get folder path of opened jproj file""" openedJprojFilePath = app.GetProjectPath() folderPath = os.path.dirname(openedJprojFilePath) return folderPath app.View().Iso() saveFileName = u"test.png" saveFilePath = os.path.join(getFolderpathOfOpenedProjectFile(), saveFileName) app.ExportImageWithSize(saveFilePath, 1280, 960)