Hi pyramid users,
I would like to share with you what had happened after the last
update of my OpticStudio.
As you know I am using your pyramid "pam2r_v1.0.DLL" in my models
for the pyramid wavefront sensor for METIS. Everything have been
working nicely up to the latest OpticStudio 23.1 (from this
September, 2021).
But the other day, I updated Zemax to the 21.3.1, and today I
cannot load the DLL any more.
I started to do what we already know that worked in the past to load
the pyramid into zemax ( as we already described in this forum), but
does not work.
I uninstall zemax, and put the previous version, from September
(that I know it was working), but still the dll did not work.
I also asked Zemax about the problem.
Zemax support answered that they can load the "pam2r_v1.0.DLL"
without problems in the latest OpticStudio version.
They also gave me some two points of useful information for us.
Bellow I put these two important points. But before I would like to
tell you that I found out that unplugging and replugging the zemax
usb key solved my problem. After doing that it works again
normally.
The two important pieces of information from Zemax support.
1. How we need to set up the General project preferences in the
OpticStudio, from version 21.3.1.
To load external DLL it is needed to uncheck the "Use ACIS
Libraries" box. See red arrow in this image bellow.

2. One reason that can cause a
dll not to load on a computer is the way it was compiled.
They recommend contacting the person that compiled the dll and
check this setting. Please read bellow.
This article has a section about the settings to compile a dll: https://support.zemax.com/hc/en-us/articles/1500005577602-How-to-compile-a-User-Defined-DLL#compile-a-dll-general-settings-0-3.
This setting is quite important as it means that you don't need to
worry about the C++ redistributable.
As Sahil and I are both using Visual Studio, I think this may be a
reason why the dll can load on our computer and not on yours.

Cheers,
conchi
--
Conchi Cárdenas Vázquez
Optical Engineer
Instrumentation Department
Max-Planck-Institut für Astronomie
Königstuhl 17
69117 Heidelberg
Phone: +49 6221 528457