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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2590|回复: 1

[求助] skill offgrid 脚本报错

[复制链接]
发表于 2018-7-11 10:02:43 | 显示全部楼层 |阅读模式

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

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

x
procedure(snap(point newgrid)
prog((stack coord)
stack=nil
foreach(coord point
coord=round(coord/newgrid)*newgrid
stack=append1(stack coord)
)
return(stack)
));proce-prog-snap

procedure(snapgrid(libraryName @optional (cellname nil) (newgrid 0.005))
prog((library librarycell dbcv other box new_box)
if((not stringp(libraryName)) then
println("USAGE snape(libraryname cellname newgrid)")
else
if(stringp(cellname) then
library=ddGetObj(libraryName cellname)
librarycell=list(library)


else
library=ddGetObj(libraryName)
librarycell=library~>cells
);if
when((not library)
if(stringp(cellname) then
printf("ERROR : library \"%s\" or cell \"%s\" not exsit!\n" libraryName cellname)
else
printf("ERROR : library \"%s\" not exsit!\n" libraryName)
);if
return(nil)
);when

foreach(cell librarycell
foreach(view cell~>views
when(view~>name=="layout"
if(stringp(cellname) then
dbcv=dbOpenCellViewByType(libraryName cellname "layout" "maskLayout" "a")
else
dbcv=dbOpenCellViewByType(libraryName view~>cell~>name "layout" "maskLayout" "a")
);if

foreach(shape dbcv~>shapes
other=0

case(shape~>objType
("rect" box=shape~>bBox bbox=1)
("polygon" box=shape~>points bbox=0)
("path" box=shape~>points bbox=0)
(t other=1)
);case

if((other==0) then
new_box=nil

foreach(point box
new_box=append1(new_box snap(point newgrid))
);foreach

if((bbox==1) then
shape~>bBox=new_box
else
shape~>points=new_box
));if-if

);foreach-shape

foreach(inst dbcv~>instances
if((inst~>mosaic==nil)  then
inst~>xy=snap(inst~>xy newgrid)
else
inst~>mosaic~>uX=round(inst~>mosaic~>uX/newgrid)*newgrid
inst~>mosaic~>uY=round(inst~>mosaic~>uY/newgrid)*newgrid
inst~>mosaic~>xy=snap(inst~>mosaic~>xy newgrid)
);if
);foreach-inst

)));when-foreach-view-cell
if(stringp(cellname) then
printf("SUCCESS : library \"%s\" cell \"%s\" snap to newgrid : %1.4f\n" libraryName cellname newgrid)
else
printf("SUCCESS : library \"%s\" snap to newgrid : %1.4f\n" libraryName newgrid)
);if
return(t)
);if
));proce[/code]
各位大佬帮忙看下,在Skill CIW里面load这段程序的时候出现然后输入snap(lib cell grid),
出现下面这条错误


怎样解决这条错误
 楼主| 发表于 2018-7-11 13:48:39 | 显示全部楼层
本帖最后由 samshitao 于 2018-7-11 13:49 编辑

回复 1# samshitao

                               
登录/注册后可看大图

这个错误,望解答
捕获.PNG
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-19 07:27 , Processed in 0.020489 second(s), 8 queries , Gzip On, Redis On.

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