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

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 8688|回复: 13

[原创] debug切换层次skill代码

[复制链接]
发表于 2018-4-11 09:56:34 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
新手刚开始学习skill,把公司前辈们留下的代码进行了更改,功能是进行选中层次的层次切换,其中有两个工艺,希望该程序在两个工艺中都能适用,代码如下,找不到错误,不会debug,求大神们指点
hiSetBindKey("Layout" "<key>1" "convertm2tom1()")
procedure(changeLayer()
let((tech tw tv)
tw=hiGetCurrentWindow()
tv=geGetEditCellView()
tech=ciCacheLibName(tv)
if(tech == "s18_tech"
then
procedure(convertm2tom1()
prog((cw cv selObjects i)
cw=hiGetCurrentWindow()
cv=geGetEditCellView()
selObjects=geGetSelSet(cv)
for(i 0 length(selObjects)-1
selObjects~>layerNum=70
);for
return(t)
);prog
);procedure
else
procedure(convertm2tom1()
prog((cw cv selObjects i)
cw=hiGetCurrentWindow()
cv=geGetEditCellView()
selObjects=geGetSelSet(cv)
for(i 0 length(selObjects)-1
selObjects~>layerNum=44
);for
return(t)
);prog
);procedure
);if
);let
);procedure
发表于 2022-10-15 19:41:50 | 显示全部楼层
学习了学习了
回复 支持 反对

使用道具 举报

发表于 2022-9-5 15:08:03 | 显示全部楼层
顶一下
回复 支持 反对

使用道具 举报

发表于 2022-9-5 10:24:56 | 显示全部楼层
谢谢分享
回复 支持 反对

使用道具 举报

发表于 2022-9-5 10:15:27 | 显示全部楼层
procedure(CCSpteSetVisible(layoutList "l")
let(()
pteSetActiveLpp(car(layersList))
pteSetNoneVisible(?panel "Layers")
foreach(layer layerList  pteSetVisible(layer t "Layers"))
)
)
回复 支持 反对

使用道具 举报

发表于 2018-8-22 14:51:47 | 显示全部楼层
非常感谢+1
回复 支持 反对

使用道具 举报

发表于 2018-7-2 18:51:50 | 显示全部楼层
Debug 要使用SKILL IDE 调试才比较好定位
回复 支持 反对

使用道具 举报

发表于 2018-6-28 21:13:27 | 显示全部楼层
回复 1# rebecca2018
Sorry no Chinese input at this computer.
Finally understand the purpose of your code. To be honest, I have not seen this kind of structure before: procedure inside procedure. Theoretically this can work, but you may end up with some issue due to different user cases.


I modify your code a little bit, have not really try this code yet, it should be easier to debug.

procedure(convertm2tom1()
prog((cw cv tech selObjects i layerMun)
  cw=hiGetCurrentWindow()
  cv=geGetEditCellView()
  selObjects=geGetSelSet(cv)


  tech=ciCacheLibName(cv)
  if(tech == "s18_tech" then

    layerNum = 70
  else
    layerNum = 44
  );if

  for(i 0 length(selObjects)-1
    selObjects~>layerNum=layerNum

  );for
  return(t)
);prog
);procedure


hiSetBindKey("Layout" "<key>1" "convertm2tom1()")




The thought is simple, you define the value of layerNum by detecting the technology.
And then apply to all the selected objects.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-5-17 12:06:37 | 显示全部楼层
回复 5# jiangtaojack
谢谢你的提醒哦,我一直没有注意过这个问题。已经改成大写了。我去查了一下以前的代码,有些用的大写有些用的小写,貌似都能用,看来是大小写都可以的。不过标准的layout bindkey里面是用的大写。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-5-17 12:03:09 | 显示全部楼层
回复 4# z20102760

谢谢哦,我按你说的改了以后没有语法错误了。不过这个代码还有很多其他的问题,正在继续优化中。。。。。。
回复 支持 反对

使用道具 举报

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

本版积分规则

关闭

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

X

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

GMT+8, 2025-9-10 19:26 , Processed in 1.962828 second(s), 4 queries , Gzip On, Redis On.

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