/* Function Name : rebuildLSW Description : This routine first removes ALL layers from the LSW. It then determines all drawn layers existing through the hierarchy of the current cellView. If any layer is NOT already set as "valid" in the baseLayerList, it will be added to the LSW as visible and selectable. Usage example : From layout window or CIW -> rebuildLSW */ procedure(RebuildLSWCV() prog(( cv tf techlist list_lsws) leIconifyLSW() ; better paint time when closed cv = geGetEditCellView() tf = techGetTechFile(cv~>lib) unless(list_lsws = rexMatchList("lswSetValidLayerForm" hiFormList()) hiDisplayAppDBox(?name 'LSWWarn ?dboxBanner "LSW Activate" ?dboxText "The Set Valid Layers panel is being invoked for the first time.\n Please hit OK/Cancel on it or reactivate the function again.\n") leHiSetValidLayer() list_lsws = rexMatchList("lswSetValidLayerForm" hiFormList()) ) foreach(form list_lsws techlist = cons(evalstring(symbolToString(form))~>leLayerTechNameField~>value techlist) ) unless(member(tf~>libName techlist) hiDisplayAppDBox(?name 'LSWWarn ?dboxBanner "LSW Activate" ?dboxText "The Set Valid Layers panel for this technology\n is being invoked for the first time.\n Please hit OK/Cancel on it or reactivate the function again.\n") leHiSetValidLayer() ) leiSetAllFormValue(tf~>path nil) ;leSetAllLayerValid( nil tf ) ; turn everything off ;leSetLayerValid( list("instance" "drawing") t ) leiToggleValidCB( 0:0 0:0 'button1 "" tf~>libName tf~>fileName list("instance" "drawing")) foreach(lpp cv~>lpps leiToggleValidCB( 0:0 0:0 'button1 "" tf~>libName tf~>fileName list(lpp~>layerName lpp~>purpose)) ;leSetLayerValid( list(lpp~>layerName lpp~>purpose) t ) ) leiSetValidFormCB(tf~>path t) leiSetValidFormCB(tf~>path nil) ;;hiFormDone(lswSetValidLayerForm_1) leSetAllLayerVisible(t) leSetAllLayerSelectable(t) leDeiconifyLSW() ; open it back up ) ) RebuildLSWCV()