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
Closed

LayerPropertiesNodeRef not working as documented? #276

klayoutmatthias opened this issue Jun 15, 2019 · 0 comments

Comments

@klayoutmatthias
Copy link
Collaborator

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
Fixed #276 (Layer properties name cannot be updated)
klayoutmatthias added a commit that referenced this issue Jun 18, 2019
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant