how to use expression in NetTracerConnectivity

edited August 2023 in Python scripting

Hello,
I'm trying to extract the entire connected shape using the NetTracer of the klayout script.
I have already defined "Connectivity" and "Computed and symbolic layers" (from Technology Manager) in gui environment before. So I tried a similar approach.
However, the connectivity between metal - via - metal could be easily defined, but it is difficult to define the connectivity including expression.

In the code below, I expressed that there is a connection between 15/0 and 16/0.
tech.connection('15/0','16/0','17/0')
But here 15/0 should actually apply NOT with 2/0. (In the actual process, 15/0 is cut due to 2/0 layer ) I am experiencing a lot of trouble in this part. Maybe this work is possible through the NetTracerSymbolInfo class, can you tell me the example code?
Here's my code.

import pya

tracer = pya.NetTracer()
tech = pya.NetTracerConnectivity()
tech.connection('15/0','16/0','17/0')

# Do I have to define a symbolic name here?

Thank you for your support every time

Comments

  • edited August 2023

    You gave the answer already: expressions are only supported in symbolic layers - so like this:

    import pya
    
    tracer = pya.NetTracer()
    tech = pya.NetTracerConnectivity()
    tech.symbol('15NOT2', '15/0-2/0')
    tech.connection('15NOT2','16/0','17/0')
    

    Matthias

Sign In or Register to comment.