Guilin Sun
Ansys Employee

I guess you know how to get the eigen vector: https://optics.ansys.com/hc/en-us/articles/360034925793-eig-Script-command

You will need to get the eigen vector in an analysis group; in "model"; or in Custom FOM if possible: 

https://optics.ansys.com/hc/en-us/articles/360034922953-Optimization-utility

examples:

Inverse design of y-branch

Inverse design of waveguide crossing