Find out how you can save time and energy using the Zemax Programming Language!
- 134 Topics
- 363 Replies
NSC Polygon Object: where is prism_array.zpl macro?
I found a NSC polygon object 'prism_array.pob' that does ALMOST what I want (put a linear array of microprisms on a 'slab' of material), but I would like to generate (micro-)prisms having different angles, spacing, scale, and different thickness 'slabs.' Editing the .POB file shows that it starts as follows with the comment that it was created by a ZPL macro 'prism_array.zpl': '! This polygon object was created by the prism_array.zpl macro ! V 1 82.50000000 50.00000000 0 V 2 82.50000000 -50.00000000 0 V 3 -82.50000000 -50.00000000 0 V 4 -82.50000000 50.00000000 0 R 1 2 3 4 0 0 V 5 82.50000000 50.00000000 10.00000000 ...' But I can't find the prism_array.zpl macro to edit it, see what can be varied, or to use it to generate new prism array .POBs. Can anybody provide a copy of prism_array.zpl, or point me to where to find it? I have the latest OpticStudio release 20.2 (Professional, perpetual), and can't find
access to cfg file
Hi I want to create zpl macro that print TFR (throogh focus MTF) data to text file. In order to get relevant information I need to change the settings. I tried to do this by 'MODIFYSETTINGS' but then I got error massage that said 'cannot open setting file'. I did not find any explanation in Zemax manual where this setting file located and I can create it such that it can be open. I would like if you can give me some information about this file type and how I can access into it. Thanks! image of ZPL file:
ZPL Macros: What FUNCTIONS and KEYWORDS are replaced or obsolete?
There are times when we run an old ZPL Macro and it may not work in the newest version of OpticStudio. This happens because FUNCTIONS and KEYWORDS are obsolete, even though Zemax/OpticStudio have not made any KEYWORDS obsolete since before 2006, and only 1 function obsolete in the past 5 years.The table below is for mapping the FUNCTIONS/KEYWORDS. If you have a macro that doesn't work and are forced to use Zemax 13 or earlier, perhaps you can check the table below and lookup what the old code is to manually map it and make it work in the newest version of OpticStudio.Feel free to add any we've missed in the comments section, and I'll update the main post. Type Old New Comment Function FVAN(x) FTAN(x) Function STDD(surf, 0) SPRO(surf, 60) Function STDD(surf, 1) SPRO(surf, 61) Function STDD(surf, 2) SPRO(surf, 62)
Copying Image Simulation images in ZPL macros
Saving Image Simulation images in a ZPL macroTo output an image file from the Image Simulation tool in a macro, one needs to create a configuration file. This has to be done once manually by pressing Save from the settings menu of the analysis window (Fig. 1).Figure 1 - Creation of a configuration file (*.CFG) from the settings menu of the Image Simulation window.If an Output File is specified, the next time Image Simulation is called from a macro, a file will be saved in the image folder of OpticStudio, typically: User.Name\Documents\Zemax\IMAFiles\, with the corresponding name. The Image Simulation analysis can be called in a macro with the command line: OPENANALYSISWINDOW "Sim"If the Output File is to be specified in the macro, it can be done with this command line: MODIFYSETTINGS name_of_cfg_file$, ISM_OUTPUTFILE, output_name$Where the string variables name_of_cfg_file$ and output_name$ correspond to the configuration file full path, and the output file name, such as MyOutputImag
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.