热度 2| |||
脚本功能:鼠标滚轮切换选中通孔类型,如:通孔 “M1_M2” 切换到通孔 “M2_M3”
文件名称:changeViaType.il
软件版本:IC617及以上版本(IC616未测试)
快 捷 键:Alt + 鼠标滚轮
使用方法:CIW窗口 load("XXX/changeViaType.il")后,在 layout 中鼠标选中需要更改的通孔(一次可选择多个),
按住 Alt 键,并滚动鼠标滚轮即可。
代码如下:
procedure(changeViaType(state) let((cv tech viaList vias varmin varMax origin orient name viaParams var) cv = geGetEditCellView() tech = techGetTechFile(cv) viaList = tech~>viaDefs~>name vias = geGetSelSet() varMin = 0 varMax = length(viaList) - 1 foreach(via vias if(via~>objType == "stdVia" then origin = via~>origin orient = via~>orient name = via~>viaHeader~>viaDefName viaParams = via~>viaHeader~>overrideParams var = lindex(viaList name) - 1 if(state == "up" then var = var + 1 ) if(state == "dw" then var = var - 1 ) if(var > varMax then var = varMax ) if(var < varMin then var = varMin ) viaName = nth(var viaList) viaDefId = techFindViaDefByName(tech viaName) params = viaDefId~>params dbDeleteObject(via) newVia = dbCreateVia(cv viaDefId origin orient viaParams ) geSelectObject(newVia) );end if );end foreach );end let );end proc hiSetBindKey("Layout" "Alt<Btn4Down>" "changeViaType(\"up\")") hiSetBindKey("Layout" "Alt<Btn5Down>" "changeViaType(\"dw\")")
可能会有Bug,未进行深入测试。