I'm just starting out with SKILL, and the task that I'm trying to accomplish is given a cellview, to get the type of the view (i.e., schematic, netlist, symbol, etc). I've been looking through skdref.pdf, and I've gotten to where I know how to access properties and traverse the design hierarchy, as demonstrated by the following code fragment to print the entire hierarchy:
foreach( lib ddGetLibList() printf("%s\n" lib~>name) foreach( cell ddGetObjChildren(lib) printf("\t%s\n" cell~>name) foreach( view ddGetObjChildren(cell) printf("\t\t%s\n" view~>name) ) ))
However, I can't figure out how to get the type of the view. Is there any function to do that?
Thanks in advance for any help.
what about the following code, instead of using ddGetObjChildren:
foreach( lib ddGetLibList() printf("%s\n" lib~>name) foreach( cell lib~>cells printf("\t%s\n" cell~>name) foreach( view cell~>views printf("\t\t%s\n" view~>name) ) ))
Hi CClauson,just found your code generates the same output as mine, so thisisn't really an enhancement ;-)
What do you expect from the view-type?The type of a view will always be ddViewType, you can get itfrom view~>type or by calling ddGetObjType(view)
In reply to StefanSL:
To get the view type, use this (in your inner loop):
master=ddGetObj(lib~>name cell~>name view~>name "*")viewType=ddGetFileViewType(master)
In reply to Andrew Beckett:
Thanks for the replies!
I tried this, but I got the error message:
*Error* eval: undefined function - ddGetFileViewType
I actually came up with a different way of doing what I needed to do, so the question is no longer urgent, but the problem is still open.
In reply to CClauson:
My apologies, I made a mistake when typing the post. The function should have been ddMapGetFileViewType.
Sorry about that,