Skip to main content
Answer

Encapsulate ZPL marco

  • December 9, 2021
  • 3 replies
  • 155 views

Dear all,

 

I’m currently developing several Marcos for a specific system. I’m wondering if there is a method in ZEMAX that can let me to encapsulate my code like a black box? 

 

Best wishes

Daoming

Best answer by Alissa Wilczynski

No, there is no encryption system for macros within OpticStudio.

3 replies

Alissa Wilczynski
Zemax Staff
Forum|alt.badge.img+3

No, there is no encryption system for macros within OpticStudio.


xavier_bth
  • Monochrome
  • October 20, 2023

Hello,

I am following up on this request to encrypt the content of a zpl macro in Zemax. Is there a way to write a script in Pyhton, encrypt this code and call such fonction from my zpl macro?

 

Best regards


MichaelH
Ansys Staff
Forum|alt.badge.img+2
  • Ansys Staff
  • October 20, 2023

Use a compiled (EXE) C#/C++ code with the ZOS-API.  This is not “encrypted” but the files will be binary and unreadable.