Skip to main content

In interactive mode - I would like to update the merit value and the operand values after every perturbation I do on a surface variable (e.g.; Decenter-X). 

For some reason - executing this code line does not seem to update the IDE at all.

# Before perturbation: apply a value to a surface cell
TheSystem.MFE.CalculateMeritFunction()
# After perturbation: Step to read updated Merit Values and Merit Operand Values - No Change!

Any ideas?

Not sure why it wouldn’t update but using the following line of code right after solved the issue.

# update all windows in Zemax
ZOSAPI.LensUpdateMode.AllWindows

Marking the question as solved.

Thanks - Asuku


Reply