Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 62730

Forum Post: RE: If condition failure

$
0
0
Your code will always say either "apple is absent" or "orange is absent" because for each window, it will check first that it is not "apple" - if so, it will print that, otherwise if it's not "orange" it will print that. Put another way, if the window contained "apple", it would tell you that orange was absent. If it contained "orange", it would tell you that apple is absent. That's not really a specific SKILL issue, it's a programming logic issue. I suspect what you really want to do is find out for a particular lib/cell/view whether it's in a window already. You could do: procedure(CCFfindExistingWindow(libName cellName viewName) let((svw) car(exists(win hiGetWindowList() { svw=win~>cellView svw~>libName==libName && svw~>cellName==cellName svw~>viewName==viewName } )) ) ) If you then do CCFfindExistingWindow("lp_amr" "apple" "layout") it would return the window id of the window containing it, or nil if not found. Alternatively, you could use these built-in functions instead: procedure(CCFfindExistingWindow(libName cellName viewName) let((cv) cv=dbFindOpenCellView(ddGetObj(libName) cellName viewName) cv && geGetEditCellViewWindow(cv) ) ) That's probably a bit more direct. Regards, Andrew.

Viewing all articles
Browse latest Browse all 62730

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>