求助:写了一段修复grid的skill,但是无法Hierarchy save,求解
procedure( OnGrid( Point ) ;
if( listp(Point) then
mapcar( lambda( (x) OnGrid(x) )Point)
else
round((Point/Grid))*Grid
)
)
procedure( PutOnGrid(Grid )
layerL=list(list("layer1" "drawing"))
cv=dbOpenCellViewByType("libname""cellname" "layout" nil "a")
WWAA=leSearchHierarchy(cvlist(-1000:-1000 1000:1000) 32 "inst" list(list("view name""==" "layout" )))
foreach(Object WWAA
Object~>xy = OnGrid(Object~>xy)
)
WWAA1=leSearchHierarchy(cv list(-1000:-10001000:1000) 32 "array" list(list("lib name" "==""libname" )))
foreach(Object WWAA1
Object~>bBox = OnGrid(Object~>bBox)
Object~>xy = OnGrid(Object~>xy)
Object~>uX = OnGrid(Object~>uX)
Object~>uY = OnGrid(Object~>uY)
)
foreach(layx layerL
WWAA2=leSearchHierarchy(cvlist(-1000:-1000 1000:1000) 32 "rectangle"list(list("layer" "==" layx)))
foreach(Object WWAA2
Object~>bBox = OnGrid(Object~>bBox)
)
WWAA3=leSearchHierarchy(cvlist(-1000:-1000 1000:1000) 32 "path" list(list("layer""==" layx)))
foreach(Object WWAA3
Polygon = leConvertShapeToPolygon(Object)
Object~>points = OnGrid(Polygon~>points)
)
WWAA4=leSearchHierarchy(cvlist(-1000:-1000 1000:1000) 32 "polygon" list(list("layer""==" layx)))
foreach(Object WWAA4
Object~>points = OnGrid(Object~>points)
)
;
layerL=leSearchHierarchy(cv list(-1000:-1000 1000:1000) 32"mosaic" list(list("layer" "==" list(x"drawing"))))
;foreach(Object LayerL
;Object~>xy = OnGrid(Object~>xy)
);foreach
);procedure
PutOnGrid(0.002)
dbSave(cv)
;setof(dbSave(dfsad~>cellview))
;setof(WWAA
dbSave(WWAA~>cellview)))
dbClose(cv)
;hiSetBindKey("Layout" "<Key>v""PutOnGrid(0.002)")
初步怀疑是因为不能Hierarchy 保存或是拿不到写的权限。应该如何解决呢
顶顶顶顶顶顶顶顶顶
顶,小编继续加油。
list(x"drawing")))) 这里的X是咋?
非常感谢,下载学习
非常感谢,下载学习