It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I try to export cells information with fixed names to csv file using search and replace function.
I have several questions?
1): it shows cells information, but only in hierarchy, how to get them in flat?
2):the csv file have some information, but I only need xy points, how to get them without reprocessing data?
Best regards!
Weiling
Comments
Hi @Weiling_Zheng,
I don't fully understand what you are looking for, but here is a query that gives you the "flat" bounding box centers of all shapes on layer 1/0 from the top cell of the layout and all cells below:
Explanation:
select <expressions> from <query>
computes expression(s) on the query results.$(CellView.active.cell.name)..
selects the cell tree below the current cell. .instances of ...
will expand to all instances in the cell tree.path_dtrans
is the accumulated transformation from the cell the shape is in to the current cell.shape.dbbox.center
gives the bounding box center of the current shape.t*x
transforms the object "x" by the transformation "t", hencepath_dtrans*shape.dbbox.center
will give you the position of the shape's bounding box center in coordinates of the top (current) cell.Maybe that helps.
Matthias
@Matthias
Hi, thank you for your respond.
The skill you give can select shapes on certain layer of the top. But how to change this to get instances position with fixed name prefix, for example, the top has sub-instances, with names of abc1/abc2/abc3/abcetf. How to get those instances' center position in flat?
Best regards!
Weiling
So you want center positions of instances, not shapes?
Please try:
Matthias
@Matthias

Thank you for your respond. I use this code, but get this information.
Are there other terms not modified in this code?
Best regards!
Weiling
Sorry, there was a typo.
It's supposed to be "inst", not "instance" (see https://www.klayout.de/doc-qt5/about/custom_queries.html#k_4 for a full description):
Matthias