You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're right. That is not supported right now. Libraries are instantiated at startup time and not reloaded. The original intention is to have libraries that are static (i.e. PDK) components, not pieces that are edited in parallel.
I understand that a "reload" feature would help too. But there are corner cases: libraries are basically Python or Ruby objects - loading them from a file is one option, but dynamically generating them is another one. Also there is a request to load multiple files into the same library. That flexibility makes it difficult to define "reload". At least in case of the code, execution of the code equals "reloading", but that requires an extension of the library API by a "reload" method and also implementation of that function.
Description: Updates all layouts using this library.
This method will retire cells or update layouts in the attached clients. It will also recompute the PCells inside the library. This method has been introduced in version 0.27.8.
There is a new Method "Library#refresh_all" (static) and you can create your own reloader by reimplementing Library#reload (needs to return the library name). Also, the "File" menu now has a new entry "Refresh Libraries".
However, I could not reproduce the original issue - for me, library layouts that got changed are reloaded automatically.
Because it was convenient, this patch also contains new features for #2172.
Activity
klayoutmatthias commentedon Oct 2, 2025
Hi Martin,
You're right. That is not supported right now. Libraries are instantiated at startup time and not reloaded. The original intention is to have libraries that are static (i.e. PDK) components, not pieces that are edited in parallel.
I understand that a "reload" feature would help too. But there are corner cases: libraries are basically Python or Ruby objects - loading them from a file is one option, but dynamically generating them is another one. Also there is a request to load multiple files into the same library. That flexibility makes it difficult to define "reload". At least in case of the code, execution of the code equals "reloading", but that requires an extension of the library API by a "reload" method and also implementation of that function.
Matthias
martinjankoehler commentedon Oct 3, 2025
Hi Matthias,
this API function already seems to exist
https://www.klayout.de/doc/code/class_Library.html#method29
klayoutmatthias commentedon Oct 11, 2025
There is a new Method "Library#refresh_all" (static) and you can create your own reloader by reimplementing Library#reload (needs to return the library name). Also, the "File" menu now has a new entry "Refresh Libraries".
However, I could not reproduce the original issue - for me, library layouts that got changed are reloaded automatically.
Because it was convenient, this patch also contains new features for #2172.
klayoutmatthias commentedon Nov 9, 2025
Feature is merged.