2021年2月8日 星期一

交換兩條bondwire的落點

前一篇的分散bondwires的落點地script無法很好處理兩排die pad bondwire問題。可以透過以下script來交換bondwire的落點以解決bondwire空中交錯的問題。將其設為熱鍵,可以簡化操作。

import ScriptEnv
ScriptEnv.Initialize("Ansoft.ElectronicsDesktop")
oDesktop.RestoreWindow()
oDesktop.ClearMessages("", "", 2)
oProject = oDesktop.GetActiveProject()
oDesign = oProject.GetActiveDesign()
oLayout = oDesign.GetActiveEditor()

seles = oLayout.GetSelections()

A, B = seles[0:2]

Ax, Ay = oLayout.GetPropertyValue('BaseElementTab', A, 'Pt1').split(',')
Bx, By = oLayout.GetPropertyValue('BaseElementTab', B, 'Pt1').split(',')
oLayout.ChangeProperty(
[
"NAME:AllTabs",
[
"NAME:BaseElementTab",
[
"NAME:PropServers",
A
],
[
"NAME:ChangedProps",
[
"NAME:Pt1",
"X:=" , str(Bx) + 'mm',
"Y:=" , str(By) + 'mm'
]
]
]
])
oLayout.ChangeProperty(
[
"NAME:AllTabs",
[
"NAME:BaseElementTab",
[
"NAME:PropServers",
B
],
[
"NAME:ChangedProps",
[
"NAME:Pt1",
"X:=" , str(Ax) + 'mm',
"Y:=" , str(Ay) + 'mm'
]
]
]
])

oLayout.Select(seles[0:2]) 



(圖一)切換前後排交叉 bondwires的落點來避免交叉


沒有留言:

張貼留言