Question

If I want to iterate through different zbf files as input for POP, could this be done in zpl?

  • 19 December 2023
  • 2 replies
  • 26 views

Is there a way to iterate through a list of zbf as input for POP? Could this be done in Macro? Any examples to refer to?

Thanks very much.


2 replies

Userlevel 7
Badge +2

Hi @icybird,

 

Strictly speaking, there is the MODIFYSETTINGS keyword that can be used with:

POP_SOURCEFILE: The file name if the starting beam is defined by a ZBF file, DLL, or multimode file.

 

Note that:

The settings file must be manually created prior to using MODIFYSETTING

 

In my tests, there’s something odd with the case though. If you don’t write the file name with the right case-sensitivity, the script doesn’t complain but the File setting is empty. Not sure why this is happening, but better make sure you type case sensitive file names.

Here’s an example of how to use the ZPL keyword:

FORMAT 2.0

FOR ii, 32, 64, 32
# ZBF file name
file_name$ = "test_one_" + $STR(ii) + ".zbf"

# Change the ZBF file name
MODIFYSETTINGS "<path_to_cfg_file>", POP_SOURCEFILE, file_name$

# Create a new analysis
OPENANALYSISWINDOW "pop"
NEXT

In my example, I’m using two ZBF files that I already had that were named “test_one_32.zbf” and “test_one_64.zbf”.

Depending on what you want to do with the POP results though, it might be better suited to use the ZOS-API.

Let me know if that helps and take care,

 

David

Hi David,

Thank you very much for the hint!

Reply