| |
/* Function: "Ctrl" or "Shift" + mouse wheel to modify the horizontal or vertical number of through holes(via) Instructions: 1.In the CIW window, load this il file 2.In the layout window, after selecting via, hold down "Ctrl" or "Shift" and slide the mouse wheel Note: When selecting via, you may accidentally select other devices. This script only modifies via parameters, not other device parameters. */ procedure(EditVia(dir num) let((instList viaList rotation org) instList=geGetSelSet() viaList=setof(obj instList obj~>objType=="inst") rotation=list("R90" "R270" "MYR90" "MXR90") foreach(via viaList when(dir==1 if(member(via~>orient rotation)==nil then org=via~>row if(org!=1 || num!=-1 then via~>row=apply('plus list(org num)));end if else org=via~>column if(org!=1 || num!=-1 then via~>column=apply('plus list(org num)));end if );end if );end when when(dir==2 if(member(via~>orient rotation)==nil then org=via~>column if(org!=1 || num!=-1 then via~>column=apply('plus list(org num)));end if else org=via~>row if(org!=1 || num!=-1 then via~>row=apply('plus list(org num)));end if );end if );end when );end foreach );end let );end procedure hiSetBindKeys("Layout" list( list("Shift<Btn4Down>" "EditVia(1 1)") list("Shift<Btn5Down>" "EditVia(1 -1)") list("Ctrl<Btn4Down>" "EditVia(2 1)") list("Ctrl<Btn5Down>" "EditVia(2 -1)") ) )
用途:用在IC51的环境下,修改via的row和column。
用法:在CIW窗口load EditVia_51.il脚本,然后用绑定的快捷键调用。(Shift+鼠标滚轮上下是改row,ctrl+鼠标滚轮上下是改column)
有个小问题是IC51环境下用o创建的via的属性属于inst,如果row和column都设为1,这时候创建出来的via没有row和column这两个属性(不知道为什么,也访问不到row和column的值),只有把row或column手动改为2及以上时,才会具备row或column这个属性(两个属性彼此独立,只要没手动改就不具备这个属性,怪得很)。