Guilin Sun
Ansys Employee

Did you use those script inside Optimization ? it only holds certain script to work there. The best way to do this is in the "model".  Then you choose its output as the FOM during the optimization. Please try.