P
PolyPusher
Guest
All,
Here is the routine I came up with to ignore "text" layer. I use it
for layout. We want to get the dataextent but wanted the ability to
place text "outside" of the dataextent. Our tapeout data doesnt' have
the text in it anyways.
For example, we can place text for pad names, etc....
Does the routine look solid enough? Any comments to make it better
would be appreciated.
Thank you,
PolyPusher.
procedure(EFbBox()
let((cvbox EFbox EFLowestX EFLowestY EFHighestX EFHighestY EFFlag
EFPrevLowestX EFPrevLowestY EFPrevHighestX EFPrevHighestY Xvar
EFBoxVar
EFSkip EFdataExtent dataExtent output EFXlow EFYlow EFXhigh EFYhigh)
EFLowestX=nil EFLowestY=nil EFHighestX=nil EFHighestY=nil
EFPrevLowestX=nil EFPrevLowestY=nil EFPrevHighestX=nil
EFPrevHighestY=nil EFFlag=0 EFSkip=0
EFXlow=nil EFYlow=nil EFXhigh=nil EFYhigh=nil
cvBox=geGetEditCellView()
geSelectAll()
foreach(EFBox geGetSelectedSet(cvBox)
EFBoxVar=list(EFBox~>bBox)
;lower left
EFLowestX=car(car(car(EFBoxVar)))
EFLowestYvar=nil
EFLowestYvar=car(car(EFBoxVar))
EFLowestY=cadr(EFLowestYvar)
;upper right
EFHighestXvar=nil
EFHighestXvar=cadr(car(EFBoxVar))
EFHighestX=car(EFHighestXvar)
EFHighestYvar=cadr(car(EFBoxVar))
EFHighestY=cadr(EFHighestYvar)
if(EFBox~>layerName!="text"
then
;if this is the first in the foreach, set coordinate
;as reference
if(EFFlag==0
then EFPrevLowestX=EFLowestX
EFPrevLowestY=EFLowestY
EFPrevHighestX=EFHighestX
EFPrevHighestY=EFHighestY
);if
EFFlag=EFFlag+1
;println(EFFlag)
if(EFLowestX<=EFPrevLowestX
then EFPrevLowestX=EFLowestX
;println(EFPrevLowestX)
)
if(EFLowestY<=EFPrevLowestY
then EFPrevLowestY=EFLowestY
)
if(EFHighestX>=EFPrevHighestX
then EFPrevHighestX=EFHighestX
)
if(EFHighestY>=EFPrevHighestY
then EFPrevHighestY=EFHighestY
)
);if then for text
);foreach
geDeselectAll()
;make "dataExtent string" for output.
print("(( ")
print(EFPrevLowestX)
print(" ")
print(EFPrevLowestY)
print(" ))")
print("(( ")
print(EFPrevHighestX)
print(" ")
print(EFPrevHighestY)
print(" ))")
EFXlow=sprintf(nil "%f" EFPrevLowestX)
EFYlow=sprintf(nil "%f" EFPrevLowestY)
EFXhigh=sprintf(nil "%f" EFPrevHighestX)
EFYhigh=sprintf(nil "%f" EFPrevHighestY)
EFdataExtent=append(EFdataExtent list(strcat("(( " EFXlow " " EFYlow
" )" " " "( " EFXhigh " " EFYhigh " ))")))
txtFile=strcat("/tmp/" cvBox~>cellName "_extent.txt")
fp=outfile(txtFile)
output=sprintf(nil "Data Extent for Cell %s is \n\n %L"
cvBox~>cellName EFdataExtent)
fprintf(fp "Data Extent for Cell %s is %L" cvBox~>cellName
EFdataExtent)
hiDisplayAppDBox(?name 'noLayerError
?dboxBanner "Information"
?dboxText output
?dialogType hicErrorDialog
?buttonLayout 'Close)
close(fp)
);end let
);end procedure
Here is the routine I came up with to ignore "text" layer. I use it
for layout. We want to get the dataextent but wanted the ability to
place text "outside" of the dataextent. Our tapeout data doesnt' have
the text in it anyways.
For example, we can place text for pad names, etc....
Does the routine look solid enough? Any comments to make it better
would be appreciated.
Thank you,
PolyPusher.
procedure(EFbBox()
let((cvbox EFbox EFLowestX EFLowestY EFHighestX EFHighestY EFFlag
EFPrevLowestX EFPrevLowestY EFPrevHighestX EFPrevHighestY Xvar
EFBoxVar
EFSkip EFdataExtent dataExtent output EFXlow EFYlow EFXhigh EFYhigh)
EFLowestX=nil EFLowestY=nil EFHighestX=nil EFHighestY=nil
EFPrevLowestX=nil EFPrevLowestY=nil EFPrevHighestX=nil
EFPrevHighestY=nil EFFlag=0 EFSkip=0
EFXlow=nil EFYlow=nil EFXhigh=nil EFYhigh=nil
cvBox=geGetEditCellView()
geSelectAll()
foreach(EFBox geGetSelectedSet(cvBox)
EFBoxVar=list(EFBox~>bBox)
;lower left
EFLowestX=car(car(car(EFBoxVar)))
EFLowestYvar=nil
EFLowestYvar=car(car(EFBoxVar))
EFLowestY=cadr(EFLowestYvar)
;upper right
EFHighestXvar=nil
EFHighestXvar=cadr(car(EFBoxVar))
EFHighestX=car(EFHighestXvar)
EFHighestYvar=cadr(car(EFBoxVar))
EFHighestY=cadr(EFHighestYvar)
if(EFBox~>layerName!="text"
then
;if this is the first in the foreach, set coordinate
;as reference
if(EFFlag==0
then EFPrevLowestX=EFLowestX
EFPrevLowestY=EFLowestY
EFPrevHighestX=EFHighestX
EFPrevHighestY=EFHighestY
);if
EFFlag=EFFlag+1
;println(EFFlag)
if(EFLowestX<=EFPrevLowestX
then EFPrevLowestX=EFLowestX
;println(EFPrevLowestX)
)
if(EFLowestY<=EFPrevLowestY
then EFPrevLowestY=EFLowestY
)
if(EFHighestX>=EFPrevHighestX
then EFPrevHighestX=EFHighestX
)
if(EFHighestY>=EFPrevHighestY
then EFPrevHighestY=EFHighestY
)
);if then for text
);foreach
geDeselectAll()
;make "dataExtent string" for output.
print("(( ")
print(EFPrevLowestX)
print(" ")
print(EFPrevLowestY)
print(" ))")
print("(( ")
print(EFPrevHighestX)
print(" ")
print(EFPrevHighestY)
print(" ))")
EFXlow=sprintf(nil "%f" EFPrevLowestX)
EFYlow=sprintf(nil "%f" EFPrevLowestY)
EFXhigh=sprintf(nil "%f" EFPrevHighestX)
EFYhigh=sprintf(nil "%f" EFPrevHighestY)
EFdataExtent=append(EFdataExtent list(strcat("(( " EFXlow " " EFYlow
" )" " " "( " EFXhigh " " EFYhigh " ))")))
txtFile=strcat("/tmp/" cvBox~>cellName "_extent.txt")
fp=outfile(txtFile)
output=sprintf(nil "Data Extent for Cell %s is \n\n %L"
cvBox~>cellName EFdataExtent)
fprintf(fp "Data Extent for Cell %s is %L" cvBox~>cellName
EFdataExtent)
hiDisplayAppDBox(?name 'noLayerError
?dboxBanner "Information"
?dboxText output
?dialogType hicErrorDialog
?buttonLayout 'Close)
close(fp)
);end let
);end procedure