Kyle
Ansys Employee

You can use the "updateportmodes" command to change the selected port modes in a script instead of using the set command to change the "selected mode numbers" property. The syntax for the "updateportmodes" command is given on this page:
Please try that and let me know if it helps.