It looks like you're new here. If you want to get involved, click one of these buttons!
it is in fact. But you should make yourself familiar with Ruby and the basics of the programming API.
Here is a very brief example. It creates one cell, one layer and one rectangle on that layer and writes the whole to a file called "x.gds":
layout = RBA::Layout::new
# database unit 1nm:
layout.dbu = 0.001
# create a top cell
top = layout.cell(layout.add_cell("TOP"))
# create a layer: layer number 1, datatype 0
layer = layout.insert_layer(RBA::LayerInfo::new(1, 0))
# create one rectangle with lower-left coordinates at 0,0
# and width of 1um and heigth of 2um (coordinates are in
# database units)
top.shapes(layer).insert(RBA::Box::new(0, 0, 1000, 2000))
# write to x.gds
You can run the script using KLayout in batch mode with this command line:
klayout -z -r path_to_script
thank you for mentioning the text file approach. You're right, that is also a valid option.
I personally prefer the Ruby-based approach but maybe that is because I am quite familiar with it :-)
Let me list some advantages which come into my mind for every approach.
Generation of text files + Conversion: