I am trying to find a skill function that can change the layer of any shape of the layout from one layer to another. For example: all the shapes that are with M1 in the layout change them to M2, all the shapes that are in M2 change them to M3...
I need to do this for many different layers.
Can someone help me with this?
Thank you in advance
Right now I am using Find/Replace function manually and is working but when I need to change many layers then it is not very nice to do it in this way.
In reply to MariaOtz:
cv=geGetEditCellView()LP=car(exists(lpp cv~>lpps LP~>layerName=="M2" && LP~>purpose="drawing"))LP~>shapes~>layerName="M3"
Of course, you'll need to do it in the right order (don't do M1 to M2, then M2 to M3 because all the M1 will also end up on M3).
In reply to Andrew Beckett:
Thank you very much for your quick response.
I tryed what you said but I get a warning: illegal left hand side of the assignment operator.
It does not do the conversion properly because I have some layers that have not been change. Can this be because I have some guardrings that have metal 1 inside. This script does not work with the ROD multipart paths?
THank you very much
Sorry, I typed it too quickly (I didn't test it) and made some typos - so here's a correction:
cv=geGetEditCellView()LP=car(exists(lpp cv~>lpps lpp~>layerName=="M2" && lpp~>purpose=="drawing"))LP~>shapes~>layerName="M3"
As for ROD objects (multi-part paths), if the shapes is a subShape of the ROD object, then it will not change layer if you try - you'd have to "unname" the ROD object before changing it. Cadence Online Support Solution 11157752 gives some tips on this.
Thank you again. It is working now :-)
I will take a look at the problem with the RODs now
Sorry for bothering you again. But in case I want to make this script work through all the hierarchy what function do I need to use?
I tried with the leSearchHierarchy but it doesn´t work.
THank you very much,
Does anyone know how to run the script through all the hierarchy?
I am still trying to find a solution for this. I tried different things but I didn't make it work.
Something along these lines:
procedure(MYtraverseHier(cvId @optional (done makeTable('cellViewsDone nil))) ; do whatever change you want here - e.g. layer change ; now traverse the hierarchy foreach(master cvId~>instanceMasters ; filter out anything done before, or pcell instances ; could extend this condition to filter out certain libraries - do what you want unless(done[master] || master~>superMaster done[master]=t MYtraverseHier(master done) ) ))
This is not tested, but it's a fairly standard recursive hierarchy traversal.
Thank you very much Andrew.
It works fine :-)