procedure(CDS_FFCopyLibCells(srclib destlib @key force) ;_Nov 5 01 sikand 47 ;;procedure to copy all the cells in a library to a new library. The cells are ;;opened and instance masters are re-mapped to the new lib if they were referencing ;;the original lib to begin with. ;; this just copies cells from one library to another library ;; the target library must exist ;; libfiles and categories are not handled since it assumes ;; this is a cell based copy prog((curLibId newLib topCats cellList catList allCats catContents catID numCells curCount destLibFiles srcLibFiles id srcLoc destLoc ipcPid) curLibId = ddGetObj(srclib) newLib=destlib unless( ddGetObj(newLib) error("Library %s does not exist, aborted\n" newLib) ) numCells=length(curLibId~>cells) curCount=1 foreach(cell curLibId~>cells if(CDS_FFdbCopyCell(?srcLib curLibId~>name ?srcCellName cell~>name ?destLib newLib ?destCellName cell~>name ?copyHier nil ?force force ?updateInsts nil ?copyFromRefLib nil) then printf("Copied cell %d of %d: %s...\n" curCount++ numCells cell~>name) else printf("Error: Problem copying %s. Have you specified a valid Lib name?\n" cell~>name) ) ; ** if CDS_FFdbCopyCell ** ) ; ** foreach cell ** ;now that all the cells are copied, go reset the instance pointers printf("Resetting Instance Master Pointers...\n") foreach(cell curLibId~>cells foreach(view cell~>views CDS_LFresetInstMasters(newLib cell~>name view~>name) ) ) ) ; ** prog ** ) ; ** procedure CDS_FFCopyLibCells **