Inkscape.org
Creating New Extensions Writing Changes to Parameter Values
  1. #1
    Peter Kelley Peter Kelley @yellek

    Is it possible to write changes to parameter values and have them appear as the defaults the next time I run my extension? Let's say I have a counter that I want to increment automatically each time the extension is run so the user doesn't have to change it. In the first execution of the extension it is 001 then when I run the extension again it is 002 etc. Ideally this would work with Alt-Q Run Previous Extension but I could live without this bit.

  2. #2
    inklinea inklinea @inklinea⛰️

    The .inx menu system is not dynamic.

    When Inkscape exits cleanly, the last values used in the extension gui are saved to preferences.xml and then loaded from there when Inkscape is opened again.

    That's about it. Hacking preferences.xml would run the risk of breaking Inkscape when it starts up.

    It can be done with a custom gui and the use of python configparser to save settings each time to an .ini file.

    However that is a lot of work, and you lose the ability to use live preview.

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Writing Changes to Parameter Values