Cadence Skill 论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 15034|回复: 23

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

[复制链接]
发表于 2013-7-13 01:04:01 | 显示全部楼层 |阅读模式
  1. /****************************************************/
  2. /*               Title :  Via Center                                */
  3. /*     Execute Command :  via_center                                */
  4. /*              Author :  Vivien Luo                */
  5. /*       Creation Date :  2013-07-13                */
  6. /*       Creation Date :                                          */
  7. /*            Web site :  www.allegro-skill.com     */
  8. /*             E-maial :  admin@allegro-skill.com        */
  9. /*                            QQ :  379809083                                        */
  10. /****************************************************/

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

  13. procedure(via_center()
  14. notdone = t
  15. axlUIWPrint(nil "Via Center Set V1.0")
  16. axlUIWPrint(nil "Written by VivienLuo - Email:admin@allegro-skill.com")
  17. while(notdone
  18.         FirstPin = nil
  19.         SecondPin = nil
  20.         axlClearSelSet()
  21.         axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))
  22.         axlUIWPrint(nil "Please Select First Pin.....")
  23.         axlSingleSelectPoint()
  24.         FirstPin = car(axlGetSelSet())
  25.         axlClearSelSet()
  26.         axlHighlightObject(FirstPin)
  27.         axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))
  28.         axlUIWPrint(nil "Please Select Second Pin.....")
  29.         axlSingleSelectPoint()
  30.         SecondPin = car(axlGetSelSet())
  31.         axlClearSelSet()
  32.         axlHighlightObject(SecondPin)
  33.         when(FirstPin != nil && SecondPin != nil
  34.                 centerPoint = (xCoord(FirstPin->xy) + xCoord(SecondPin->xy))/2 : (yCoord(FirstPin->xy) + yCoord(SecondPin->xy))/2
  35.                 axlClearSelSet()
  36.                 axlSetFindFilter(?enabled list("noall" "vias") ?onButtons list("noall" "vias"))
  37.                 axlUIWPrint(nil "Please Select Via...")
  38.                 axlSingleSelectPoint()
  39.                 selVia = car(axlGetSelSet())
  40.                 if(selVia
  41.                         then
  42.                                 axlDBCreateVia(selVia->name centerPoint)
  43.                         else
  44.                                 axlUIWPrint(nil "No via selected....")
  45.                 )
  46.         );end when
  47.         axlDehighlightObject(FirstPin)
  48.         axlDehighlightObject(SecondPin))
  49. );end procedure

  50. procedure(via_center_done()
  51.                 notdone = nil
  52.                 axlFinishEnterFun()
  53.                 axlUIWPrint(nil "- Done -")
  54. )
  55. procedure(via_center_Cancel()
  56.                 notdone = nil
  57.                 axlCancelEnterFun()
  58.                 axlUIWPrint(nil "- Cancel -")
  59. )
复制代码
发表于 2013-7-18 11:49:17 | 显示全部楼层
謝謝大大學到很多
发表于 2013-7-19 08:59:20 | 显示全部楼层
不好意思问,新手很多看不懂
发表于 2013-7-25 16:06:42 | 显示全部楼层
axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个函数括号里面的看不懂
 楼主| 发表于 2013-7-25 21:18:39 | 显示全部楼层
冷青瓷 发表于 2013-7-25 16:06
axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个 ...

用于筛选需要选择的目标
发表于 2013-7-26 08:40:55 | 显示全部楼层
能否详细说明?
 楼主| 发表于 2013-7-26 21:18:53 | 显示全部楼层
冷青瓷 发表于 2013-7-26 08:40
能否详细说明?

就是设置侧边栏find里面的选项,设置成什么,就只能选择什么。
发表于 2013-7-31 00:01:13 | 显示全部楼层
就是让option栏里的哪些项打勾,哪些项不打勾。
发表于 2013-7-31 00:04:41 | 显示全部楼层
冷青瓷 发表于 2013-7-25 16:06
axlSetFindFilter(?enabled list("noall" "pins") ?onButtons list("noall" "pins"))这句看不明白,是这个个 ...

这句就是控制Find面板中哪些项 打勾,哪些项不打勾
发表于 2014-4-12 23:01:41 | 显示全部楼层
多谢楼主了,
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|网站地图|Cadence Skill 论坛 ( 蜀ICP备13024417号 )

GMT+8, 2024-4-25 22:51 , Processed in 0.149239 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表