Macro to create blackbox file

  • 11 December 2019
  • 5 replies
  • 54 views

Hello everyone, I am wondering What operands in macro I can use to create a blackbox file? or it have to be API level? Thanks



5 replies

Userlevel 4
Badge +3
Hi Cindy,



After a bit of searching, neither the API nor ZPL support creation of a blackbox at this time.



Our general expectation is that black box files are created for special situations and thus wouldn't be something that would require automation/scripting control. Can you tell me a bit more about why you need to accomplish this via ZPL? Understanding your workflow and the impact of this functionality (or lack thereof) will allow us to think of alternative solutions and discuss the issue with our product team.

Hello Alissa,



Thank you for your quick reply. So in our company we do have lot Zemax design prescriptions need convert to blackbox files and lot files will come in future also. If Zemax can add some new feature in either ZPL or API will be reallly helpful to reduce time spend on this time consuming procedure.



Thanks.

Cindy


Userlevel 4
Badge +3
Hi Cindy! A quick question for you... when manually creating a black box, you have to select the first and last surface to export. In the systems that you're using, is it consistently true that you're exporting the entire range of surfaces (from 1 to Image)? Or are you exporting a subset of the surfaces in the system, like creating two black boxes, one for the surfaces in front of the stop and another for the stop and subsequent surfaces? If we do implement programmatic controls for this, I want to make sure it's as easy as possible for your use case.
Hello Alissa,



Yes, most system have the stop aperture in the middle, so two black boxes are needed. Just like the case you described, we expect 2 blackbox files combined: one for the surfaces in front of the stop and another for the stop and subsequent surfaces. It is really great to hear that Zemax start considering implement this programmatic controls! Thank you very much for your help.

Best regards,

Cindy
Userlevel 2
Badge
I need to create a lot of black box files to send to clients and I do think it could be improved.  The most common example is that I need to hide all optical surfaces, just showing input rays and rays to the image plane. 

  1. Why do I need to create two black box files?  Why can't the stop be in the BB file?

  2. If the stop really has to be visible, why can't I select the first and last surfaces and have Optic Studio create two black box files, one in front and one behind the stop?

  3. Why does Optic Studio tell me I need to fix the semi-diameter of elements in the BB file.  Why can't Optic Studio do it for me?  Perhaps it should inform me that semi diameters have become fixed.

  4. The most tedious black box files are zoom systems.  The moving spaces cannot be in the BB file (understandably) so I might need 4 BB files in one lens file.  It would be handy to be able to set multiple ranges of the BB files all at once (eg surface 1-8, 10-14, 16-18, 20-28).


Reply