I created the text (drawing ) in mos ,but it can't attatch in mos
时间:10-02
整理:3721RD
点击:
I created thetext (drawing ) in mos ,but it can't
attatch in mos ,So I uesd the skill see below :
but When I load "CCSattachLabels.il"inCIW
there are the syntax error(syntax error in line 5 column 3 of file) ,What is the problem ?
procedure( CCSattachLabels()
let( (cv allLabels x1 y1 box inst)
cv=geGetWindowCellView()
allLabels=setof(x cv~>shapes x~>objType=="label")
foreach( label allLabels
x1=car(label~>xy)
y1=cadr(label~>xy)
box=list(x1:y1 x1+0.001:y1+0.001)
inst=car(dbProduceOverlapInst(cv box))
leAttachFig(label inst)
printf("Attached label %s at %L to inst %s\n" label~>theLabel label~>xy inst~>name)
) ;foreach
) ;let
) ;procedure
attatch in mos ,So I uesd the skill see below :
but When I load "CCSattachLabels.il"inCIW
there are the syntax error(syntax error in line 5 column 3 of file) ,What is the problem ?
procedure( CCSattachLabels()
let( (cv allLabels x1 y1 box inst)
cv=geGetWindowCellView()
allLabels=setof(x cv~>shapes x~>objType=="label")
foreach( label allLabels
x1=car(label~>xy)
y1=cadr(label~>xy)
box=list(x1:y1 x1+0.001:y1+0.001)
inst=car(dbProduceOverlapInst(cv box))
leAttachFig(label inst)
printf("Attached label %s at %L to inst %s\n" label~>theLabel label~>xy inst~>name)
) ;foreach
) ;let
) ;procedure
帮你改了一下 貌似可以了
procedure( attach()
let( (cv allLabels x1 y1 box inst x)
cv=geGetSelectedSet()
cv1 =geGetWindowCellView()
allLabels = list()
foreach(shap cv
if(shap~>objType == "label" then
allLabels = cons( shap allLabels)
else nil
)
)
foreach( label allLabels
x1=car(label~>xy)
y1=cadr(label~>xy)
box=list(x1:y1 x1+0.001:y1+0.001)
inst=car(dbProduceOverlapInst(cv1 box))
leAttachFig(label inst)
printf("Attached label %s at %L to inst %s\n" label~>theLabel label~>xy inst~>name)
) ;foreach
) ;let
) ;procedure