Edit layer specs in batch mode

edited December 2012 in KLayout Support
Hi,

I have a CIF file with different objects. When I convert them to GDS (in batch mode), all of them are on one layer. But since I need to have them on different layers I would like to separate these objects into different layers in my batch script. My CIF file has a few "layers" with different names. In the layer tab it looks like "AAA 1/0", "BBB 1/0", "CCC 1/0". And I would like to have "AAA 1/0", "BBB 2/0", "CCC 3/0". I can change it quite easily in the GUI, but I wasn't able to do this in batch mode. (By the way: the "layers" (e.g. "AAA 1/0") will have the same names for all my CIF files, and "AAA" must always be on layer 1, "BBB" on layer 2, and so on.)

My batch file for the CIF->GDS conversation looks like this:
ly=RBA::Layout.new
ly.read($input)
ly.write($output)

Then I found different discussions here in the forum like
http://klayout.de/forum/comments.php?DiscussionID=173
and
http://klayout.de/forum/comments.php?DiscussionID=130
and
topics like mw.current_view.load_layer_props(lyp_filename)
but sadly I wasn't able to solve my problem with these discussions.

Is there an easy solution for my problem?

Thanks in advance for your help!

Best regards,
ItsMe

Comments

  • edited December 2012

    Hi, it's me too :-)

    I wonder how that can happen. Normally KLayout tries to assign individual layer numbers to the layers.

    If the layer name is a number or of the form "LxDy", it tries to recover GDS layers/datatypes from the layer name. Otherwise it will assign consecutive numbers to the layers in the order they appear.

    This assignment can be overruled with a layer mapping on the reader options page (File/Reader Options), but even with the option it's usually not possible to create layers with the same layer/datatype.

    Could you tell what the actual layer names are (I bet they aren't AAA, ...)? If they are true "names" in the sense that they don't resemble numbers, the assignment should be unique.

    Regards,

    Matthias

  • edited November -1
    Hey, it's me again ;)

    I solved the problem with your hint concerning the automatic assigning! :)

    The layer names are something like "A11", "A12" and so on. And what I did now was to remove the leading "A". And now the "11" (formerly "A11") will be layer 11 (in the GDS file), and "12" (formerly "A12") will be layer 12, and so on. This is exactly what I wanted to have.

    Thanks for your help!!

    Best regards!
Sign In or Register to comment.