Hello,
I am very new to ZOSAPI - python programming. I am simply following the article - https://support.zemax.com/hc/en-us/articles/1500005489681-Connect-to-OpticStudio-from-Python-with-the-ZOS-API-Interactive-Extension
I am using pycharm IDE and running pythonZOSconnection6.py from it (as suggested, in running this in python console). Upto this point, everything seems to be working fine. I see the prompt in optics studio (given below) with the status : connected.
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/29442655-de57-45df-ad6b-84dcc8065be9.png)
All the variable are also loaded :
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/48b16902-d3e0-4286-9955-562bf5c90633.png)
However, I don’t see this feature “It means that there is an “Intellisense” when working with the Interactive Extension” .
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/eb22928b-ee3b-4eba-8b6d-f91cc15647ac.png)
That is, none of the methods of ZOSAPI are loaded. And if I try running the example code (as suggested in the article), I am getting an error, “ModuleNotFoundError: No module named 'ZOSAPI'” .
![](https://uploads-us-west-2.insided.com/zemax-en/attachment/a8826e3b-0160-430b-af4a-18081440b213.png)
I have already installed Pythonnet package, which helped to make the first connection with optics studio. But I don’t understand why a script other than the boilerplate won’t work.
I hope this is an easy mistake to fix.
Best answer by David.Nguyen
View original