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

日志

个人收藏(十字标尺)

已有 628 次阅读| 2023-5-18 11:23 |系统分类:芯片设计

  • leHiClearRuler([ w_windowId ]):清除给定窗口内的标尺,如果没有传递参数就清除当前窗口的标尺,相当于快捷键:Shift+k.
  • leHiCreateRuler( [ w_windowId ] ):在给定的窗口内开始创建标尺,如果没有传递参数就在当前窗口创建标尺,相当于快捷键:k.
  • leHiCreateMeasurement( [ w_windowId ] ):在给定的窗口内开始创建标尺,与leHiCreateRuler()功能一致。
  • leHiClearmeasurement( [ w_windowId ] ):清除给定窗口内的标尺,与leHiClearRuler()功能一致。
  • leHiClearMeasurementInHier( [ w_windowId ] ):清除给定窗口内的所有标尺,包括该窗口以下的所有层次。
  • leCreateMeasurement( d_cellViewId l_points ):在给定的工作窗口按照给定的坐标创建标尺,这个是我们接下来会使用的函数。
  • enterPoint( [ ?prompts l_promptList ] [ ?cursor x_cursor ]... ):获取鼠标点击位置的坐标值,使用这个函数可以确定标尺的中心点
  • (实际上,文中的使用方法Cadence是不推荐的,具体可以查看该函数的详细说明)。

Measurement     /ˈmeʒəmənt/   n  测量;度量
prompt    /prɒmpt/   n    提示符
cursor   /ˈkɜːsə(r)/ n 光标,游标
coordinate 坐标
prompt 提示符


大概思路是首选获取鼠标点击位置的坐标,然后以该坐标为中心,
分别调用leCreateMeasurement()函数在上、下、左、右方向创建标尺,
标尺长度由脚本中变量:ruler_length确定,可以根据需要更改。



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 ;;; start create cross ruler
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;; bindkeys
 
 hiSetBindKeys("layout"
     list(
         list("Ctrl<Key>K" "create_cross_ruler_cb()")
    )
)
procedure( create_cross_ruler_cb( )
    let(
        (
           ruler_length
            point_loc
            x_loc y_loc
        )
        ruler_length = 1 ;change ruler length
        point_loc = enterPoint(?prompts '("Point at the point")  ?cursor hicCross );get point
        x_loc = xCoord( point_loc ) ;get x coordinate
        y_loc = yCoord( point_loc ) ;get y coordinate
        ; print(x_loc)
        ; print(y_loc)
        leCreateMeasurement( geGetEditCellView( ) list( point_loc (x_loc+ruler_length:y_loc)  ) )  ;create ruler
        leCreateMeasurement( geGetEditCellView( ) list( point_loc (x_loc-ruler_length:y_loc)  ) )  ;create ruler
        leCreateMeasurement( geGetEditCellView( ) list( point_loc (x_loc:y_loc+ruler_length)  ) )  ;create ruler
        leCreateMeasurement( geGetEditCellView( ) list( point_loc (x_loc:y_loc-ruler_length)  ) )  ;create ruler
    ) ;let
) ; procedure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; end create cross ruler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


点赞

评论 (0 个评论)

facelist

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

  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 28

    粉丝
  • 7

    好友
  • 20

    获赞
  • 8

    评论
  • 访问数
关闭

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


手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 ) |网站地图

GMT+8, 2025-11-6 03:07 , Processed in 0.026413 second(s), 11 queries , Gzip On, Redis On.

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