User properties access in klayout / Ruby (PROPATTR, PROPVALUE) ?

edited November 2013 in General
Hi Matthias -

Shapes' user properties (key and value - or PROPATTR and PROPVALUE in GDS spec) - can be easily accessed and controlled in klayout GUI - is there any way to access them in Ruby, programmatically?

(I searched the manual, and the Forum - and still have no clue...).

Thanks,

Max

Comments

  • edited November -1

    Hi Max,

    The respective methods are Shape#set_property to set a property and Shape#property to get a property (or nil, if no property is set). Every property has a value and a key. In GDS, the key is always a number (PROPATTR) and the value is a string. In OASIS, keys and values can be strings or numbers.

    Regards,

    Matthias

  • edited November -1
    Hi Matthias -

    thanks a lot!

    I guess this feature was not documented in Klayout-0.21.16-2.pdf...

    Max
  • edited November -1

    Hi Max,

    well, 0.21.16 was not featuring those methods. I'll update the PDF documentation some time, but frankly that's not my top priority. If you want to have an up-to-date documentation, I'd ask you to look for the online doc or the build-in one.

    Regards,

    Matthias

Sign In or Register to comment.