Updating text variable via Action Plugin

Hi,
For our company’s workflow we have to manually get the latest svn revision number and modify the respective text field on the PCB’s soldermask with this number incremented and save/commit it to the svn to have the correct svn number on the production pcb.
I want to automate this process with an action plugin and need to know, if I just need to change the variable in the project file or also in the pcb file:


And what do I need to add in the python code, that the modification inside the textfile is transported to the update in the text field itself in the PCB editor?
Because when I changed the text variable in the pcb file settings, the value is not updated in the text field.

Hannes

There is clearly a bug around the update of the variable inside Text field on the PCB.
On way to go around it is to use the variable inside a footprint, so that the test is part of the footprint. Doing this the change oof the variable do update the text of the footprint

Hi, thanks for the suggestion but this is way to laborious for our usecase.

With AI-help I created a script that changes the text variable. When looking at the pcb file in text editor it was edited correctly but the change is not present in the text variables view in “Board Setup” though. And after executing the script and hitting save on the pcb file, the change in the text file is taken back weirdly: