obj= oApp.GetActiveProject()
parts = []
refDesList = []
result = {}
for net in obj.ScrGetNetNameList():
obj.ScrGetPinsOnNet(net, "", "" , [], parts, refDesList)
for i, j in set(zip(parts, refDesList)):
pins = []
obj.ScrGetPinsOnNet(net, i, j , pins, [], [])
try:
result[j].append((net, pins))
except:
result[j]=[(net, pins)]
obj.ScrLogMessage('\n\n')
for i in result:
obj.ScrLogMessage(i+': '+str(result[i]))
沒有留言:
張貼留言