First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
answered 2016-09-26 01:15:42 -0600
Get the maximum bus number and add one would probably the easiest way: max(psspy.abusint(flag=2, string='NUMBER')[1][0])+1
max(psspy.abusint(flag=2, string='NUMBER')[1][0])+1