Is a Real View Only KLayout Version Possible?

edited September 2015 in KLayout Support
The Windows package contains an klayout_vo_app.exe, which I thought would be an viewer only version.

But I can see no difference in behavior, to the klayout_app.exe.

One can save cells, even when not in editing mode and it also can be set into editing mode.

Is there a way, to set it into a mode, where editing mode can not be enabled and more importantly, can the save cell function be disabled in non editing mode?

Especially the save cell feature can inadvertedly wreak havoc on a database, when users fiddle with the settings.

Comments

  • edited November -1
    klayout -ne
  • edited November -1
    This overrides the edit mode, if set in the klayoutrc.

    But still, cells can be saved - which actually is the bigger issue.
  • edited November -1

    Hi mprott,

    you're right, the klayout_vo.exe magically lost it's "viewer only" properties ... I'll fix that in the next minor release. Since that is

    I have not considered "save" a "modifying" operation, so it's there is viewer mode also. But you can disable these menu items with a script that is automatically executed on startup.

    Still there are ways to cheat. But it's a matter of trust like the "-ne" option, right? And to REALLY prevent modifications you have to remove the write permission from the files and folders.

    Matthias

  • edited November -1
    I would also not consider saving as modify.

    But, and there is a big but, you can for instance shorten the cell-names or reduce the layers on save - which certainly is modifying the database.

    Removing the write permission is unfortunately not always an option.

    Could you please post the script and how it is run?

    And please consider removing the save function from the _vo.exe, it would save a lot of pain, thank you!
  • edited November -1

    Hi,

    I see your point. I'll try to fix that in the next minor version. I should not be a big issue.

    Here is a script to disable some save functions:

    mw = RBA::Application::instance.main_window
    menu = mw.menu
    menu.action("file_menu.save").visible = false
    menu.action("file_menu.save_all").visible = false
    menu.action("file_menu.save_as").visible = false
    menu.action("@hcp_context_menu.save_cell_as").visible = false
    

    you'll find the menu paths in the setup dialog under "Application/Key Bindings". "@hcp_context_menu" represents the cell list's context menu, "@lcp_context_menu" would be the layer list's context menu.

    If you make this script "auto-run", it will be executed automatically and the menu items will not be available.

    Matthias

  • edited November -1
    Thank you very much for your fast response!

    Works well, now nobody can alter databases without some effort.

    Maybe you could change ViewerOnly to ReadOnly and leave the edit function as a choice? It is sometimes very helpful, for instance if you want to have a look at the overlaps of litho steps or something like that.
  • edited September 2015

    Hi mprott,

    "Viewer mode" is not just a user interface option - in viewer mode, the database organisation changes from an editable representation to a compact and efficient memory model. For example, OASIS shape arrays are kept as such which prevents memory explosion when loading huge OASIS files. Hence, viewer mode is fundamentally different from editor mode and I cannot simply switch between both.

    Matthias

  • edited October 2015
    Hi Matthias,

    that had slipped my mind. I do recall a huge time difference for loading and displaying large files, when switching between edit and view-only.

    Just a thought: Currently the vo_app can be switched between edit and vo mode. Would it be possible, to disable the save menues from the vo_app and leave the edit functionality as is?

    Michael
  • edited November -1

    Hi Michael,

    there is a reason for the load time difference: in viewer mode, the database will store compact shape arrays from OASIS files as such while in editor mode they are expanded. Shape arrays are no suitable basis for editing, hence editing is does not go with shape arrays.

    In other words: fast loading and editing are mutually exclusive. That is not specific to vo_app but to viewer or editor mode.

    But just a question: vo_app can be switched to edit mode? That's not intended. How can this be done?

    Matthias

  • edited November -1
    Hi Matthias,

    up to release 24.1, it was a simple matter of either edit the klayoutrc, or clicking file-setup-application-editing mode as default.

    Once set (and restarted when using setup), it would display functional edit icons.

    Release 24.2 remedied this, regardless of the <edit-mode> value in klayoutrc, no edit icons or save menus are present.

    Michael
  • edited November -1

    Oops ... something wrong here?

    This is how it's supposed to be:

    klayout_vo.exe is a pure viewer application. Save functions are disabled and you cannot switch it to editor mode. This binary is not installed in the start menu but you can create your own shortcut.

    klayout.exe is the normal application which offers editor and viewer mode. Save functions are always available.

    Isn't it that way?

    Matthias

  • edited November -1
    Hi Matthias,

    Do you recall your reply from Sept 21?

    Now it is fixed, before, not.

    Michael
  • edited October 2015

    Hi Michael,

    I'm a bit confused now ...

    I was referring to your remark (Oct-8):

    Currently the vo_app can be switched between edit and vo mode

    By "currently" you did not mean 0.24.2, but 0.24.1?

    Matthias

  • edited November -1
    Hi Matthias,

    sorry for the confusion. Indeed, I meant "current" on my machine, which was 0.24.1 back then. I saw the new release a few days after that posting. The _vo is working fine now.

    Thank you,
    Michael
  • edited November -1

    Hi Michael,

    thanks for the clarification ... classical case of race condition :-)

    Matthias

Sign In or Register to comment.