It looks like you're new here. If you want to get involved, click one of these buttons!
Hi, I'm new to all this so mind the dumb question. I'm trying to have a library of functions in a .py file that I call freely from an .lym file.
Let's say I have,
import pya import math def circleMake(numPts, radius): pts =  numPts = 500 radius = 10000 angle = 2 * math.pi / numPts for incAngle in range(0, numPts): pts.append(pya.Point.from_dpoint(pya.DPoint(radius * math.cos(incAngle * angle), radius * math.sin(incAngle * angle)))) poly = pya.Polygon(pts) top.shapes(l1).insert(poly) layout = pya.Layout() top = layout.create_cell("TOP" l1 = layout.layer(1, 0) circleMake(100, 50) layout.write("circleTryZ26.gds")
and I try to put circleMake into a different file. It says that layout/top/etc is not defined obviously. I'm not sure what the common solution is to this problem?
Thank you for your time!