Skip to main content
Solved

Matlab examples failing to connect to OpticStudio

  • January 7, 2025
  • 1 reply
  • 120 views

Michael.Young
Ultraviolet
Forum|alt.badge.img+1

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.

Best answer by Michael.Young

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\

 

 

View original
Did this topic help you find an answer to your question?

1 reply

Michael.Young
Ultraviolet
Forum|alt.badge.img+1
  • Author
  • Ultraviolet
  • 42 replies
  • Answer
  • January 7, 2025

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings