Skip to main content
Question

Error using ZOS-API in Matlab

  • January 22, 2025
  • 4 replies
  • 111 views

My codes (that were working with the 2024 version) do not work anymore with the 2025 release.
this is the error I get in the function “InitConnection()”:

Message: Could not load file or assembly 'ZemaxEngine.dll' or one of its dependencies. The dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
Source: mscorlib
HelpLink: None

4 replies

Prasath R
Zemax Staff
  • Zemax Staff
  • 3 replies
  • January 24, 2025

Hi Luca,

You might want to try changing the directory mentioned in this post. Hopefully, it will help.

Matlab examples failing to connect to OpticStudio | Zemax Community


  • Author
  • Monochrome
  • 2 replies
  • January 29, 2025

That part of the code works well, the error appears when I try to execute the line

app = TheConnection.CreateNewApplication()

NicoloAzzaroli

I have exactly the same issue.

Waiting for a solution from Zemax


Julia
Fully Spectral
Forum|alt.badge.img+2
  • Fully Spectral
  • 51 replies
  • February 7, 2025

Hi all,

Updating MATLAB to the latest version should resolve this issue. Please try updating and let us know how it goes.

下载 MATLAB、Simulink、Stateflow 和其他 MathWorks 产品

Julia


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