Drag and drop components

edited September 2013 in General

Please forgive what may seem like a basic question.

I have a bunch of standard layout components that I use over and over. I'd like these to be available somehow in a hierarchical list of "drag-and-drop" components. Right now these are just static components but in the future this will include PCells. (By "hierarchical" I just mean that these components are organized into folders.)

Now, they don't have to be literally drag-and-drop (though that would be nice) but even just selectFromAList-and-place.

I currently have a "base" file which has all the components as cells, then I open that every time I want to start a new layout. However thus doesn't seem optimal. Is there a better way?

I'm sure there is, and I think it involves adding the cells to a "library" but I'm still not fully clear on all the details...

Thanks

Comments

  • edited September 2013

    Hi,

    A "library" is in the most simple form (static layout, no PCell's) a plain layout file with multiple top cells, one for each library component (note that the components have to be top cells). That file is put into a specific place so KLayout can identify it as library. If you do so and restart KLayout, your library and the (top) cells inside that library will be shown in the "create instance" form along with the standard "Basic" library.

    You'll find some details about the library concept and specifically the installation paths here: http://www.klayout.de/doc/about/about_libraries.html.

    Matthias

  • edited November -1

    Thanks, exactly the link I was looking for but somehow missed :)

    Good, it appears what I need is a "Coded library" - however few details are given on the page. Could you perhaps provide an example?

    I searched for an example and thought I could just learn from looking at the "Basic" library. However this is not coded in Ruby..

    Thanks!

  • edited October 2013

    You'll need coded libraries to provide PCell's. That is something else - a coded library is not a layout file but a piece of code that registers something like a dynamic library in the system.

    There is a lot of information available on how to code PCell's in Ruby on the documentation pages for the PCell feature. See http://klayout.de/doc/programming/ruby_pcells.html.

    It is basically possible to code PCell's in C++ and provide this code through shared objects. The BASIC library goes that way (although not implemented as a shared object). But lacking a documentation for the internal C++ API I don't advertise that way.

    Matthias

Sign In or Register to comment.