Skip to main content

ZPL Feature request


Mark.Nicholson
Luminary
Forum|alt.badge.img+3

Hi Zemax team,

Whenever a macro is run, the Edit/Run dialog briefly flashes on the screen:

Can that be suppressed? There’s no time to intercept any of the options. It’s just a bit annoying, and it takes longer for this to flash on the screen than for my macro to run

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

2 replies

MichaelH
Ansys Staff
Forum|alt.badge.img+2
  • Ansys Staff
  • 368 replies
  • August 14, 2023

Hey Mark,

Outside of either creating the ZPL to run as a ZPLM in the MFE or as a Macro Solve (the first option doesn’t allow you to permanently change the state of the system and the second option can be non-stable based on what you’re trying to do & it doesn’t allow outputs...neither of which are good robust solutions), you cannot suppress this dialog box.  The main reason is the ZPL code has to be run in a “locked” state, meaning the user cannot change the core system in between the start of the ZPL and the end of the ZPL.  Both the MFE and Macro Solve lock TheOpticalSystem during updates but the easiest way to ensure TheOpticalSystem is locked during the execution of a ZPL is to make the Zemax Programming Language dialog popup in a modal state.

What’s your macro?  Maybe there are other options to do what you’re trying to do.  


Mark.Nicholson
Luminary
Forum|alt.badge.img+3

Yep, I figured it was a question of doing something the easy way.

The macro itself doesn’t matter, it just runs in less than 0.3 second and so the dialog popping up and going away again is about 3X the macro execution. I’m sure whatever it is that needs to be done can be done without using a second of user time showing a literal pop-up menu. 😁


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