Skip to main content

I am having an issue with the example Matlab scripts in OpticStudio. They fail to connect to OpticStudio. Here, for example is the portion of the Matlab function that connects,
 

InitConnection Function

If I uncomment the success variable to define a “custom” path to OpticStudio, then the function will work; however,  the line,
success = ZOSAPI_NetHelper.ZOSAPI_Initializer.Initialize();

assigns 0 to success.

I am curious as to why this is happening? I am running Zemax OpticStudio 2024 2.01. My installation folder for the program is

C:\Program Files\Ansys Zemax OpticStudio 2024 R1.00\

You can see the difference between the release number and the version that I’m running. I installed the program using the Ansys downloader.

Here is a follow up. I re-ran the OpticStudio installer. Now the example Matlab scripts are working. I believe that it reinstalled the ZOSAPI_NetHelper.dll and it now points towards the correct installation file.

Also, the installation files are no longer located in

C:\Program Files\Ansys Zemax OpticStudio 2024 R1.00\

but rather,

C:\Program Files\ANSYS Inc\v242\Zemax OpticStudio\

 

 


Reply