How to loop over two varaibles using /control/loop

The “/control/loop/” command can be used to loop over varaible. An example is

/control/loop filtration.mac thickness_Fe 0.05 0.3 0.05 

In the filtration.mac use commnad

/filtration/Fe_thickness {thickness_Fe} mm

If I want to have two loops, how to loop two variables.

For nested loops, the inner loop would be part of the “looping macro.” For instance, in your filtration.mac, do another /control/loop command, with a different variable name, e.g.,

   /control/loop inner.mac inner_var -0.7 0.7 0.01

Then, inner.mac can refer to both the aliases {inner_var} and {thickness_Fe} as needed. (Any and all aliases you’ve defined at the top level will be visible to all the within-loop macros.)