It looks like you're new here. If you want to get involved, click one of these buttons!
I am generating a layout with a Python script. I have a couple questions that I have not been able to sort out.
This is the beginining of my code:
import pya def SetupLayer(num, dt, name): if pya.Application.instance().main_window().current_view() is not None: pya.Application.instance().main_window().current_view().add_missing_layers() li = pya.Application.instance().main_window().current_view().begin_layers() while not li.at_end(): lp = li.current() if ((lp.source_layer == num) and (lp.source_datatype == dt)): lp.name = name lp.visible = True lp = li.next() L = pya.Layout() L.visible = True TOP = L.create_cell("TOP") PartOutline = L.layer(100, 0) SetupLayer(100, 0, "PartOutline") ScribeOutline = L.layer(200, 0) SetupLayer(200, 0, "ScribeOutline") Pads = L.layer(300, 0) SetupLayer(300, 0, "Pads") Pin_Number = L.layer(400, 0) SetupLayer(400, 0, "Pin_Number") Functional_Signal = L.layer(500, 0) SetupLayer(500, 0, "Functional_Signal") Net_Name = L.layer(600, 0) SetupLayer(600, 0, "Net_Name")
If I run the same code with a blank layout window created, it seems to run the block of code where I set the layer name but as near as I can tell, it is not the correct layout view that it is operating against. I can't seem to make the layout view I have created visible.