It looks like you're new here. If you want to get involved, click one of these buttons!
My script creates some shapes, and I'd like to have them selected when finished (to make it obvious to the user which ones were just created).
The documentation describes how to find shapes to get their "ObjectInstPath":
But I don't see how to get this for a newly created shape.
new_wg = cell.shapes(layer).insert(wg_path)
new_wg is a <pya.Shape object at 0x11cb50bd0>.
Is there a way to construct my own ObjectInstPath, so that I can select it?
lv.object_selection = ObjectInstPath
In my case, my script starts off with a selected object (a PCell), and finishes with a newly created shape. Perhaps the "dup" method could be used, but I'm not sure if would work for mixing cells vs. shapes.
Also, is there any way to get a history of ObjectInstPath items that were added to a layout? Like a history? For example, if a script starts with nothing selected, could it automatically figure out which shape was added most recently?