;; clearInvisible.il
;; clear something that invisible in
layout;; zoujunlin 2017/11/19
procedure(clearInvisible()
let(()
cv = geGetEditCellView()
;;delete steiners
foreach(x cv->steiners dbDeleteObject(x));end foreach
;;delete guides
foreach(x cv->guides dbDeleteObject(x));end foreach
;;delete markers
foreach(x cv->markers dbDeleteObject(x));end foreach
;;delete changedLayers
allLayersList = cv->lpps
foreach(xlayer allLayersList
if(xlayer->layerName == "changedLayer" then
foreach(x xlayer->shapes dbDeleteObject(x));end foreach
);end if
);end foreach
;;delete specific layers, change the list below as you wish
layersNeedDeleteList = list(list("ref" "drawing") list("hilite" "drawing"))
;;list all layers in this cell view first, so that you can find which layers need to be delete
foreach(xlayer allLayersList
printf("(%s\t%s)\n" xlayer->layerName xlayer->purpose)
);end foreach
printf("All %d layers found before layer delete...\n" length(allLayersList))
foreach(xlayer allLayersList
xlayerNamePurpose = list(xlayer->layerName xlayer->purpose)
if(exists(x layersNeedDeleteList xlayerNamePurpose == x) then
foreach(y xlayer->shapes dbDeleteObject(y));end foreach
);end if
);end foreach
allLayersList = cv->lpps
printf("All %d layers found after layer delete!\n" length(allLayersList))
);end let
);end procedure
hiSetBindKey("Layout" "<Key>]" "clearInvisible()")