vivienluo 发表于 2013-7-13 01:04:01

via center代码分享。新手不懂的地方直接回帖即可。

/****************************************************/
/*               Title :Via Center                                */
/*   Execute Command :via_center                                */
/*            Author :Vivien Luo                */
/*       Creation Date :2013-07-13                */
/*       Creation Date :                                      */
/*            Web site :www.allegro-skill.com   */
/*             E-maial :admin@allegro-skill.com        */
/*                            QQ :379809083                                        */
/****************************************************/

axlCmdRegister("via_center" 'via_center ?cmdType "interactive"
                               ?doneCmd 'via_center_done ?cancelCmd 'via_center_Cancel)

procedure(via_center()
notdone = t
axlUIWPrint(nil "Via Center Set V1.0")
axlUIWPrint(nil "Written by VivienLuo - Email:admin@allegro-skill.com")
while(notdone
        FirstPin = nil
        SecondPin = nil
        axlClearSelSet()
        axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))
        axlUIWPrint(nil "Please Select First Pin.....")
        axlSingleSelectPoint()
        FirstPin = car(axlGetSelSet())
        axlClearSelSet()
        axlHighlightObject(FirstPin)
        axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))
        axlUIWPrint(nil "Please Select Second Pin.....")
        axlSingleSelectPoint()
        SecondPin = car(axlGetSelSet())
        axlClearSelSet()
        axlHighlightObject(SecondPin)
        when(FirstPin != nil && SecondPin != nil
                centerPoint = (xCoord(FirstPin->xy) + xCoord(SecondPin->xy))/2 : (yCoord(FirstPin->xy) + yCoord(SecondPin->xy))/2
                axlClearSelSet()
                axlSetFindFilter(?enabled list("noall" "vias") ?onButtons list("noall" "vias"))
                axlUIWPrint(nil "Please Select Via...")
                axlSingleSelectPoint()
                selVia = car(axlGetSelSet())
                if(selVia
                        then
                                axlDBCreateVia(selVia->name centerPoint)
                        else
                                axlUIWPrint(nil "No via selected....")
                )
        );end when
        axlDehighlightObject(FirstPin)
        axlDehighlightObject(SecondPin))
);end procedure

procedure(via_center_done()
                notdone = nil
                axlFinishEnterFun()
                axlUIWPrint(nil "- Done -")
)
procedure(via_center_Cancel()
                notdone = nil
                axlCancelEnterFun()
                axlUIWPrint(nil "- Cancel -")
)

f126054488 发表于 2013-7-18 11:49:17

謝謝大大學到很多

冷青瓷 发表于 2013-7-19 08:59:20

不好意思问,新手很多看不懂:dizzy:

冷青瓷 发表于 2013-7-25 16:06:42

axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个函数括号里面的看不懂

vivienluo 发表于 2013-7-25 21:18:39

冷青瓷 发表于 2013-7-25 16:06 static/image/common/back.gif
axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个 ...

用于筛选需要选择的目标

冷青瓷 发表于 2013-7-26 08:40:55

能否详细说明?

vivienluo 发表于 2013-7-26 21:18:53

冷青瓷 发表于 2013-7-26 08:40 static/image/common/back.gif
能否详细说明?

就是设置侧边栏find里面的选项,设置成什么,就只能选择什么。

warlock 发表于 2013-7-31 00:01:13

就是让option栏里的哪些项打勾,哪些项不打勾。

warlock 发表于 2013-7-31 00:04:41

冷青瓷 发表于 2013-7-25 16:06 static/image/common/back.gif
axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个 ...

这句就是控制Find面板中哪些项 打勾,哪些项不打勾

Sun 发表于 2014-4-12 23:01:41

多谢楼主了,
页: [1] 2 3
查看完整版本: via center代码分享。新手不懂的地方直接回帖即可。