I need to be able to clear the detectors in my system to run a ray trace. I found the NSDD keyword, but I keep getting an error when I type "NSDD(0,0,0,0)". This is what I use in a non-Sequential Merit Function, so why doesn't it work here?
How can I clear the detectors using a ZPL macro?
Best answer by Allie
The NSDD operand in the ZPL does perform similarly to the NSDD optimization operand, but in the case of the ZPL, we are required to specify a surface number.
When working exclusively in Non-Sequential Mode, the surface number will always be 1. You may have noticed that this is the case in the Merit Function when using NSDD. In Non-Sequential Mode, the surface is "1" and is un-editable:
The only time this changes is when we are working in a Mixed Mode system!
Additionally, we find that in the ZPL Help System file (The Programming Tab > About the ZPL), NSDD is listed as a Numeric Function. This means that it cannot be used on its own, but must instead be attached to a variable. For example:
my_variable = Numeric Function
So to be able to clear the detectors, we can use the following line:
clear = NSDD(1,0,0,0)
To make sure that it worked, you can also add UPDATE ALL so that each of the windows refreshes after the line to clear the detectors is run!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.