Hi,
I’ve been building over the years a series of python based-tools that use ZOSAPI framework in order to automatize repetitive jobs. However, the reccurent changes in the API causes regular failures in these scripts. Lately I’ve been trying to use a simple piece of code that gets the sag from the surfaces and find the following failure (where ZemaxLDE is an instance of the TheSystem.LDE, and xi, yj are points where I want my sag to be returned):
tmp = ZemaxLDE.GetSag(index, xi, yj)
File "C:\Python27\lib\site-packages\win32com\gen_py\EA433010-2BAC-43C4-857C-7AEAC4A8CCE0x0x1x0\ILensDataEditor.py", line 103, in GetSag
, X, Y, sag, alternateSag)
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 467, in _ApplyTypes_
self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args),
pywintypes.com_error: (-2147352562, 'Nombre de param\xe8tres non valide.', None, None)
Could you please tell me what could have changed (I’m still working with Zemax 21.x because afraid of further failures) so that I get this error?
thanks much for your feedback,