I creeated Text(drawing) in mos , I want to auto attatch it
时间:10-02
整理:3721RD
点击:
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
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
load & work ok
No problem.
if no inst under the label ?
use unless to box the last 2 code line
unless(inst==nil
)