April 13, 2023 at 11:45 pm
Ansys Employee
Try the script below on Spyder notebook. I ran this from the script file editor window in the CAD with Python integration using our bundled Python3. The script should create a new EME simulation file, “eme_test.lms” on your current working directory.
import numpy as np
import matplotlib.pyplot as plt
import os
import imp
lumapi = imp.load_source("lumapi","C:\\Program Files\\Lumerical\\v231\\api\\python\\lumapi.py")
os.add_dll_directory("C:\\Program Files\\Lumerical\\v231\\api\\python")mode = lumapi.MODE()
mode.addeme()
mode.addring()
mode.addmesh()
mode.save("eme_test.lms")