I am using a standalone Matlab API in sequential mode to load a .zmx file and do various analysis with data handed back to Matlab. This works perfectly except when I include a blackbox element. The .zmx file loads and I can modify and query it in standard ways. When I execute any analysis (e.g. a PSF calculation), the structures returned are empty. I don’t get an error message, just empty results. If I replace the blackbox lens with a stock element, everything works again. I can execute the analysis in OpticStudio by loading the .zmx file (with the blackbox) and selecting the analysis from the menu.
Are blackboxes incompatible with the API or is there something special you need to do, maybe telling the blackbox file to load after the .zmx file is loaded?
Thanks in advance for any pointers!