Amrita Pati
Ansys Employee

Hi,

Thanks for sharing additional details. I was able to run your script successfully:

When you test the script, make sure that you are in Layout mode. I saw this error when I tested the script in the analysis mode. As objects are not created in analysis mode, Line 1109 won't be able to find the object. Make sure that the port is being created before setting the other properties. Please let me know if you are already running it in Layout Mode and still see the error. 

Regards,
Amrita