在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
楼主: 3512596

[求助] 关于十字标尺的cadence skill,诸多不会,请教大侠们~~~~~

[复制链接]
发表于 2017-5-4 16:02:18 | 显示全部楼层
为什么我用vi创建以.il结尾的文件,写下这段代码,在ciw没办法load,它说我语法有误。。。我这菜鸟很惆怅
 楼主| 发表于 2017-5-4 16:56:05 | 显示全部楼层
额 当初抄上去的时候,抄错了吧~
发表于 2017-5-4 19:40:44 | 显示全部楼层
回复 22# 3512596


   要是抄错我就不会愁了,检查了好几次了,都没错。。。load别的也不行。。。。。。
 楼主| 发表于 2017-5-5 09:53:45 | 显示全部楼层
回复 23# 九品芝麻狐
我是说可能是当初是我抄错了
... 私信我 给我你qq号~我给你看下你的吧~
发表于 2018-6-20 19:50:31 | 显示全部楼层
同样load什么il也显示错误,,怎么破
 楼主| 发表于 2018-6-21 18:00:55 | 显示全部楼层
回复 25# 彳亍0226

;;;;procedure() 定义函数 主要包含函数名 参数列表

procedure(CrossRuler()

vr = 200  //定义参数vr=200

自己随便修改的一个自定义的rule长度
p0 = enterPoint()  //enterPoit() 获取鼠标左键点击的point点坐标
p1 = geWindowToEditPoint(hiGetCurrentWindow(),p0)

0点是相对于当前最高窗口的 坐标 但不是x进去的 当前窗口内的坐标系坐标

使用gewindowtoeditPoint()函数可以将坐标转换成当前编辑窗口的坐标系内的坐标位置。geWindowToEditPointcvId ,point1;cvId 当前窗口的 dbId

px = xCoord(p1), py = yCoord(p1)

xCoord yCood()适用于获取point1 x坐标和y坐标

dx = px+vr, dy = py+vr

sx = px-vr, sy = py-vr

//以你点击的点位中心原点,计算上下左右方向的xy的数值

leCreateRuler(geGetEditRep() list(px:pypx:dy))

leCreateRuler(geGetEditRep() list(px:pydx:py))

leCreateRuler(geGetEditRep() list(px:pysx:py))

leCreateRuler(geGetEditRep() list(px:pypx:sy))

 楼主| 发表于 2018-6-21 18:04:41 | 显示全部楼层
回复 25# 彳亍0226
linshi.png
发表于 2018-6-27 23:21:22 | 显示全部楼层
回复 15# hangji85
P.S Sorry no Chinese input right now.

To answer your second question, about the argument with "?".

There 3 type of arguments in the SKILL function: normal, optional and key.
The normal argument is the one as any other languages, when you calling the function, the value you put into the function is passed to the argument, the order is important.

for "optional", when you define the function, you need to assign a default value for each "optional" type argument. During the calling of the function, you can give a new value to overwrite the default value of the optional argument. And you can also omit it, then the default value will be used. One important thing, the order is important here.

for "key" type, it's similar as the "optional", you need to give an default value when define the function. When calling the function, if you do not overwrite the key argument, then the default value will be used. BUT, to overwrite the "key" argument, the order is not important, as you need to use "?" + "argument name" + "new value" to mention which key argument you are gonna to overwrite with what value.


Hope this give you some clue.


Good luck, and have fun with SKILL
发表于 2022-11-7 18:28:37 | 显示全部楼层


yuama 发表于 2013-2-17 13:37
procedure( CreateCrossRuler()
" Create Cross Ruler"
leClearAllRuler(getEditRep())


为什么说我最后一行有错,没抄错啊
发表于 2023-11-23 10:11:31 | 显示全部楼层


yuama 发表于 2013-2-17 13:37
procedure( CreateCrossRuler()
" Create Cross Ruler"
leClearAllRuler(getEditRep())


感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-20 08:59 , Processed in 0.029175 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表