Hello Everybody,
is it possible through the api, to get the surface Index from the highlighted or selected surface?
Hello Everybody,
is it possible through the api, to get the surface Index from the highlighted or selected surface?
Hello Luca,
Thanks for your question here!
You may access the index of the selected surface by using the GetSelectedSurface() member function of the ZOSAPI.SystemData.ISurfaceSelection Interface, please see the documentation from the ZOS-API Syntax Help below:
Best,
Csilla
Hello Csilla and thank you for your reply.
There's not IZOSAPI_Application.PrimarySystem.SystemData.ISurfaceSelection.GetSelectedSurface() function. The only function I found is ZOSAPI_Application.PrimarySystem.SystemData.Aperture.GCRS.GetSelectedSurface() but it always returns the stop surface index.
How can acces the ISurfaceSelection interface?
Thank you
Hello Luca,
Sorry for the misunderstanding.
The SurfaceSelection works for the Global Coordanite Reference Surface of your system.
By calling TheSystem.SystemData.Aperture.GCRS.GetSelectedSurface() it will return the global coordinate reference surface. You may change this global reference by setting a surface number directly, or you may set the object, the stop, or the image surface to use it as a reference.
As far as I know it is not possible to interact with the Lens Data Editor and retreive which surface is selected there, if there is one.
If you have any further questions, please let us know and we will be happy to help!
Best regards,
Csilla
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.