I am copying a schematic with a new Cell name and after that, the new cell is locked. Then I am trying to close the cell by using dbClose however the cv_new ID is empty. This is the code I am using (IC6.1.6-64b):
cv=dbOpenCellViewByType(Lib_Name Old_Name "schematic" "schematic" "r"); cv_new=dbCopyCellView( cv Lib_Name New_Name "schematic" nil nil t); -----> The cell is copied correctly but locked.
dbClose(cv);dbClose(cv_new); ------> ERROR in this line because cv_new=nil however the cell was correctly copied.
I found a in this solution (dbCopyCellView locks cell) and also in the Virtuoso Design Environment SKILL reference, that the dbCopyCellView should return the cell ID when the cell is copied but that is not my case even when the cell is correctly copied.
Do you have some idea to unlock the cell after copying it or why I am not having cell_ID return from the dbCopyCellView function?
I have tried this code however when the new cell id is found and closed also it is removed from the library manager:
cvs=dbGetOpenCellViews(); foreach(item cvs if( item->cellName==New_Name then dbSave(item); dbClose(item); ----> The cell is completely removed. )
did you get any solution to this? I encounter the same issue. The copied cell is just blank after performing the copy.
I don't remeber how I fixed it, however, something I remember is that after the copy process, the cell remains opened at memory in some way. Then just after the copy process I had to trace all the open views and check, save and close the cell if still was opened (somethimes this process should be performed twice in order the cell actually closes). In summary this is that worked for me:
cv=dbOpenCellViewByType(Lib_Name Old_Name "schematic" "schematic" "r"); cv_new=dbCopyCellView( cv Lib_Name New_Name "schematic" nil nil t);
cvs=dbGetOpenCellViews();foreach(item cvs if( item->cellName==New_Name then dbCheck(item);
dbSave(item); dbClose(item); )
I still don't see why dbCopyCellView would have returned nil if it actually performed the copy and had the resulting cellView in memory. I can't find any reports of such an issue.
By the way, dbCheck was a function in IC5141 to check the cellView for corruption - and it does nothing in IC61X (it's no longer documented). This did not (and still does not) do the same as a schematic check (that would be schCheck(cv)). I don't think I've ever had to use dbCheck in SKILL code except in some very old code specifically looking for (very rare) database corruptions in CDB.