Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

"Native"/Preferred File Format to save all properties?

Hello Matthias et al.,

Which file format, if any, is able to save ALL properties of the KLayout editor, such that when I re-open that file I get pretty much the exact same screen I had when I saved the file (same layer names, colors, stipples, top-cell etc.)?

Either I'm missing something, or it appears there isn't a "native" format yet - even OASIS loses the layer stipple/colors.

OASIS appeared closest - it saved the layer names, but lost the top-cell (upon open, it set "TOP" to top-cell) and lost layer colors/stipples.
CIF appeared to lose the "magnification" of instanced cells.
DXF couldn't store more than one top-level cell, so I couldn't even save into that format.
GDS doesn't store layer names, stipples or colors, and defaults to top-cell of "TOP", not what I previously had selected. This is even if "store cell/layer properties" is enabled.

It seems Klayout must have an internal representation that stores all these things, right?


  • The layer table is independent of the design files. You can save a "lyp" file that describes the layer names and appearance. You can reload it later. See the "File" menu and look for "Layer Properties".

  • So I guess the answer is "no", no single file format can reproduces the workspace, but there is a two-file workaround.

    I have used lyp files. The process is cumbersome - if I want to share my layout work, I save the CAD file (as OASIS format), and then save the layer properties as a separate file - maybe with the same filename. Email both of them to the other user, and they must load one and then the other. I would have to include instructions to do this as well.

    Would be extremely useful if this process were automated, as some of the new users I work with don't find this remotely obvious. They expect a "saved" file to include all the relevant information, like most other computer programs.
    Perhaps KLayout could automatically look for a *.lyp file with the same base filename as the CAD file, and load it automatically - and have an option in the Open/Save dialog to "[√] load/save Layout Properties file". Thus a single save/open command reproduces the entire workspace as files are transferred between users, or even if work is continued on a single user.

  • I indeed send the two files, and I explain the people how to load the "lyp" file.

    "Perhaps KLayout could automatically look for a *.lyp file with the same base filename as the CAD file, and load it automatically"
    This may already exist, see:
    Does it still work? Is it active by default? I believe it is not active by default.

    -> I think your request makes sense, it would be a sensible default action to load the companion "lyp" file if it is present in the same folder.

    Let us wait for Matthias' opinion? or create an new issue/wish/enhancement on github?

  • Great, thanks for the link.
    You're right that making that expression the default or a separate option (and fail safely/quietly) and adding an automatic "save *.LYP file" option, would make this whole process transparent (except for the fact that two files are generated for every CAD).

    This LYP would account for the vast majority of the environment setup, except for losing the selected "top cell". Is currently there any way to remember that in the saved file/lyp?

  • Hi demis,

    Have you tried the solution suggested in the forum? I think this works.

    But I don't want to create arbitrary files lying around when the program exits (for saving .lyp). What if multiple users look at the same file with different settings? What if the file is on a read-only location or from a http URL?

    There is two solutions built into KLayout to support your use case:
    * Sessions: store all settings in a single file. This will also include the files loaded, the rulers and other settings, not just the layer properties.
    * Technologies: manage all technology-related settings in "technologies". You can then load a file with a given technology.


Sign In or Register to comment.