Hello!
I’m attempting to use the `zosapi` package with
Below shows where the kernel crashes, without giving me a stack trace to try and diagnose why the kernel is crashing. Has anyone encountered this problem before?

Hello!
I’m attempting to use the `zosapi` package with
Below shows where the kernel crashes, without giving me a stack trace to try and diagnose why the kernel is crashing. Has anyone encountered this problem before?
Best answer by MichaelH
Quick followup:
If you’re using Jupyter, for some reason, you need to establish a connection to OpticStudio before importing the BatchRayTrace dll. So the following code works in a Jupyter notebook:
import numpy as np, matplotlib.pyplot as plt, zosapi, clr, os
zos = zosapi.App()
dll = r'c:\temp\RayTrace.dll'
print(clr.AddReference(dll))
import BatchRayTrace
print('finished')
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.