It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I am trying to use GDS2Writer functions in C++ to write GDS files. Like TEST(2) in "dbGDS2Writer.cc", if the cells have no hierarchy, there is no problem. When I try to write the cells with a hierarchy like below,
I use "add_cell()" function twice. Then, my structure looks like flat, which means it does not have a hierarchy.
How can I get the output with the same hierarchy of original GDS?
Thank you in advance!
tt
Comments
Looks like you have not created instances. "add_cell" will create cells, but making a cell a child cell of a parent means you have to create an instance of that cell in the parent.
Like here: https://github.com/KLayout/klayout/blob/master/src/db/unit_tests/dbLayoutTests.cc (Line 64++).
BTW: why using the C++ API?
Matthias
Hi Matthias,
thanks for your help. I am learning C++ and KLayout now, so I am trying to use C++ API to practice my coding skills.
BG,
tt