Below is my skill code,it's very sample!
procedure(test() opencell=dbOpenCellViewByType("test" "red" "layout" "maskLayout" "a") cellIds=leSearchHierarchy(opencell opencell~>bBox 0 "inst" list(list("cell name" "==" "SRAM_SW"))) foreach(cellId cellIds printf("LibName:%s ,CellName:%s. \n" cellId~>libName cellId~>cellName) ) dbSave(opencell) dbClose(opencell) )
It can work in CIW ,but can not work on no-graph mode.
No-graph mode command : virtuoso -nograph -restore test.il
It occur error,the error is : leSearchHierarchy: argument #1 should be a database object (type template = "dlxtl") - nil
Should I do?
Any help are best!
That error suggests that it failed to open the cellView in the dbOpenCellViewByType call. I'd expect at least a warning in the log - maybe you started Virtuoso in the wrong place? Do you get any more info if you just do:
virtuoso -restore test.il
There's really no good reason why this should be different in graphics or nograph mode (I can think of tortuous ways that you might have something in your .cdsinit which changes the working dir or forces a different cds.lib when you're not in nograph mode, but this would seem a very odd thing to do, so seems unlikely to me).
You could also add debug messages in your code (first line of your test function):
printf("DEBUG: %L\n" ddGetLibList()~>name)
This will print which libraries it can see.
Thank you for your reply!
I find the reason,in my layout directory,there has some *.lock file,it cause failed open the cell on "a" mode,delete it and re-execute success！
It confused me,in some conditions,why in CIW success,but on no-graph failed!