Skip to main content

Macro to create blackbox file

  • December 11, 2019
  • 6 replies
  • 151 views

Cindy.Chen

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

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

6 replies

Alissa Wilczynski
Zemax Staff
Forum|alt.badge.img+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.

Cindy.Chen
  • Author
  • Infrared
  • 5 replies
  • December 16, 2019

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


Alissa Wilczynski
Zemax Staff
Forum|alt.badge.img+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.

Cindy.Chen
  • Author
  • Infrared
  • 5 replies
  • December 17, 2019
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

Ian
Forum|alt.badge.img
  • Infrared
  • 14 replies
  • December 19, 2019
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).

Juan_Reto_Reynal

Hi ​@Alissa Wilczynski ! I know it’s been a long time since the start of this thread.. was there any update? Cannot find anything on the ZOS-API Syntax Help describing methods or examples useful to generate block boxes.

CC: ​@Ian ​@Cindy.Chen → If you have found an alternative way to automate this process, I’ll be happy to hear about it! I am considering automating the clicks needed to generate the black box with something like PyAutoGUI and combining the entire automation task with the ZOS-API features.

I look forward to hearing from you.


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