Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LayerPropertiesNodeRef not working as documented? #276

Closed
klayoutmatthias opened this issue Jun 15, 2019 · 0 comments

Comments

@klayoutmatthias
Copy link
Collaborator

commented Jun 15, 2019

See https://www.klayout.de/forum/discussion/1247/renaming-layers-in-python-script#latest

This code does not do what it is supposed to:

current_view = pya.LayoutView.current()
i = 1
for layer in current_view.each_layer():
  layer.name = "LAYER" + str(i)
  i += 1
klayoutmatthias added a commit that referenced this issue Jun 18, 2019
Merge pull request #280 from KLayout/issue-276
Fixed #276 (Layer properties name cannot be updated)
klayoutmatthias added a commit that referenced this issue Jun 18, 2019
Fixed #276 (Layer properties name cannot be updated)
In addition, this fix includes Python-related fixes: because
of the short lifetime of Python references, the functionality
was not as expected sometimes. Keeping copies of LayerPropertiesIterators
helped. Some tweaks were required to maintain the delete() semantics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.