xzos / PyZDDE

Zemax/ OpticStudio Extension using Python
MIT License
154 stars 64 forks source link

Assembling zSetField return tuple in Opticstudio 17.5 broken #82

Open MaximilianHoffmann opened 6 years ago

MaximilianHoffmann commented 6 years ago

https://github.com/indranilsinharoy/PyZDDE/blob/45dff7042b074574ef0ba5b6e8ee4155689f02bf/pyzdde/zdde.py#L5091-L5096

Those lines seem to be broken or they do not match the Zemax Response, fd._make and the length of rs don't match, for n=0 and n>0, this results in a error about the input argument number.

Setting the fields works.

blueshuttle commented 2 years ago

You can still use zSetSystemProperty(self, code, value1, value2=0) instead, where code = 102, 103 for field x and y