@1@2 in XOR not working with my LYP file

Hi All,

When I ran XOR and no .lyp file, klayout shows me @1 and @2 postfix on the layers to differentiate between Layout1 and Layout2.
I do not see the same when I have layers file loaded. Is there a workaround to see the layers with @1 and @2 foreach source layout?

Here is the properties section of my lyp file.

Best Regards
Rambir


#268c6b
#228c6b
0
0
C63

true
true
false
1
false
false
0
M1.drawing - 1/0

1/0@1

Comments

  • edited June 11

    Hi Rambir,

    the .lyp file does not show up properly - you should use mark down code formatting when pasting such code (use a line with triple backticks before and after the code).

    There is a secret feature which allows embedding dynamic information inside the name. This will add the "@x" layout index:

    <name>M1.drawing - 1/0@$(C+1)</name>
    

    Explanation:

    • "$..." will include a formula (KLayout expressions syntax) which is evaluated and inserted
    • "C" is a dynamic variable containing the zero-based layout index
    • "C+1" will give you the 1-based layout index
    • Hence "$(C+1)" will expand to "@1", "@2" ...

    There are more variables available:

    • "N": the layer name (OASIS, DXF, CIF ...)
    • "L" : the layer number (OASIS, GDS2)
    • "D": the layer datatype
    • "I": the layer index from the layer source (the internal database layer number) - hardly useful for normal applications
    • "C": the layout index ("cellview index")
    • "S": the layer view's source string
    • "T": the layout's title (usually the file name)

    If you don't want to modify the layer properties file you can also use "Regroup/By Layout Index" from the layer list's context menu. This will give you separate trees for "@1" and "@2".

    Kind regards,

    Matthias

Sign In or Register to comment.