Create Silkscreen text referencing Schematic Page Settings Field

Hello All,

I want to add a silkscreen that automatically references the revision no from the page settings of the schematic. How do I do this?

Here is the schematic page setting info with the Revision No:

I would like to add information automatically to the silkscreen on the PCB by assigning the ${VERSION} variable:
2022-06-18T22-44-11

Thanks in advance.

Application: KiCad PCB Editor
Version: 6.0.5-a6ca702e91~116~ubuntu20.04.1, release build
Platform: Linux 5.4.0-120-generic x86_64, 64 bit, Little endian, wxGTK, xubuntu, x11
Build Info:
	Date: May  4 2022 07:55:51

EDIT 1:
I tried the scripting console and got as far as this:

import pcbnew
import re
board = pcbnew.GetBoard()
sch_name = board.GetFileName().replace('pcb','sch')
schematic = open(sch_name,"r")      
for line in schematic:
        if "(rev" in line:
            revision=line
schematic.close()
re.findall(r'"(.*)"',line)[0]

The schematic and pcb both have a VERSION. Mixing and matching them is likely going to lead to trouble.

Try this: create a project text variable called SCHEMATIC_VERSION.

In EEschema > Page Settings set “Revision” to ${SCHEMATIC_VERSION}.

In PCBNew, set the Text Properties “Text” to ${SCHEMATIC_VERSION}.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.