It looks like you're new here. If you want to get involved, click one of these buttons!
I have tested version 28.6 comming from 27.13; I get "undefind method 'bookmark_view' for RBA::LayoutViewBase: (Class NoMethodeError)" which was not the case in 27.13 and before.
Additional question: Is there any chance to have a command to delete a bookmark in the next versions?
Could you paste some code? This method was not deleted.
This works for me:
And yes, changes for getting a new function in the API are not zero.
But you know, the problem basically is this:
thank you for your fast answer. I know klayout is a one-man project, which is unbelievable when you look at the size and quality of the project.
Your example was in python, I use the ruby binding.
work fine in 27.13, but bring "undefind method 'bookmark_view' for RBA::LayoutViewBase: (Class NoMethodeError)" in 28.7 under Windows. (I use only the windows version.)
That's weird. I just tried on Windows 10, Version 0.28.7, 64bit. The above code works for me ...
Are you using 64bit?
I entered the code in the console of the macro IDE. What puzzles me is that you see "LayoutViewBase" which is actually a special class not visible in the normal application. It is true that this class does not implement "bookmark_view", but "LayoutView" - which is the actual UI-based view - does. This separation has been introduced with the provisioning of headless layout views.
In my case - from the console -
Application::instance.main_window.current_viewgives me a "LayoutView" object and "bookmark_view" works.
What is going on?
thank you for your fast answer.
I found on my Windows 10; Version 0.28.7, 64bit:
In a fresh installed Klayout without any other user macros the macro
However if I use a custom plugin via a autostart macro
(I reduced my real plugin as much as possible to demonstrate the problem.)
I get the Error when I then try to run the first macro.
The macros were under C:\Users\~-user-~\KLayout\macros
(No problems in 0.27.13. and before)
@Frank Many thanks for that analysis and the test case. I was able to reproduce the problem.
LayoutViewBasewas introduced which does not offer the bookmark view function, but the derived class
For some reason, the plugin registration prevents this object from being promoted to
LayoutView- probably as a consequence of early C++/Ruby object binding. I have created a ticket for this: https://github.com/KLayout/klayout/issues/1360.
Unfortunately I have not found a workaround for the problem quickly. The object binding is pretty persistent, so it's hard to revert it without destroying the view.