zoujunlin的个人空间 https://blog.eetop.cn/670195 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

move_label_to_pin_center.il

已有 794 次阅读| 2017-5-21 22:57 |个人分类:script|系统分类:芯片设计

;File   :       move_label_to_pin_center.il
;Author :       ZouJunlin
;Date   :       2017/05/21
;Description:   move labels to the center of rectangle pins
;step 1 :       split object to label & textDisplay list and rectangle pin list
;step 2 :       foreach label, select the relative pin
;step 3 :       move label to the center of rectangle pin and attach to it

procedure(move_label_to_pin_center()
  let((objSet label_list pin_list targetPin x y)
;step 1 :       split object to label & textDisplay list and rectangle pin list
    bjSet = geGetSelectedSet()
    label_list = setof(x objSet x->objType == "label" || x->objType == "textDisplay")
    pin_list   = setof(x objSet x->objType == "rect")
;step 2 :       foreach label, select the relative pin
    foreach(x label_list
      if(x->objType == "label" then targetPin = car(setof(y pin_list y->pin->term->name == x->theLabel)));end if
      if(x->objType == "textDisplay" then targetPin = x->parent);end if
;step 3 :       move label to the center of rectangle pin and attach to it
      x->xy = centerBox(targetPin->bBox)
      leAttachFig(x targetPin)
    );end foreach
  );end let
);end procedure

hiSetBindKey("Layout"      "Ctrl<Key>v" "move_label_to_pin_center()")


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 9

    粉丝
  • 0

    好友
  • 3

    获赞
  • 3

    评论
  • 987

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-29 07:34 , Processed in 0.027699 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部