List of all text variables available in nightly builds

Some time ago there was a topic listing text variables: New string replacement options for kicad assets

Would it be possible to have an updated list based on the current nightly codebase?
Or perhaps there is an easy way to search for built-in text variables in the code?

See updated list below…

3 Likes

Perfect, thank you, Jeff!

This may be off topic. Is there a way to expand these values on the command line? for example, run “kicad -E ${schematic_version}” get the schematic_version. by this you will be able to define a variable in kicad and use it both in and out of kicad. Thanks.

System variables for symbol text:
REFERENCE
VALUE
FOOTPRINT
FOOTPRINT_LIBRARY
FOOTPRINT_NAME
DATASHEET
SYMBOL_LIBRARY
SYMBOL_NAME
SYMBOL_DESCRIPTION
SYMBOL_KEYWORDS
UNIT
user-defined fields by name

System variables for label text:
CONNECTION_TYPE (global labels, hierarchical labels and sheet pins only)
SHORT_NET_NAME
NET_NAME
NET_CLASS
INTERSHEET_REFS (global labels only)
user-defined fields by name

System variables for sheet text:
# (sheet number)
## (sheet count)
SHEETPATH
SHEETNAME
SHEETFILENAME
user-defined fields by name

System variables for schematic text:
# (sheet number)
## (sheet count)
SHEETPATH
SHEETNAME
FILENAME
PROJECTNAME

System variables for footprint text:
REFERENCE
VALUE
LAYER
FOOTPRINT_LIBRARY
FOOTPRINT_NAME
associated symbol’s fields by name

System variables for PCB text:
LAYER

System variables for worksheet text:
KICAD_VERSION
# (sheet number)
## (sheet count)
SHEETNAME
FILENAME
PAPER
LAYER
ISSUE_DATE
REVISION
TITLE
COMPANY
COMMENT0, COMMENT1 … COMMENT9

You can also search the code for ::ResolveTextVar.

7 Likes

System variables for symbol text:
REFERENCE
VALUE
FOOTPRINT
FOOTPRINT_LIBRARY
FOOTPRINT_NAME
DATASHEET
SYMBOL_LIBRARY
SYMBOL_NAME
SYMBOL_DESCRIPTION
SYMBOL_KEYWORDS
UNIT
EXCLUDED_FROM_BOM
EXCLUDED_FROM_BOARD
user-defined fields by name

System variables for label text:
CONNECTION_TYPE (global labels, hierarchical labels and sheet pins only)
SHORT_NET_NAME
NET_NAME
NET_CLASS
INTERSHEET_REFS (global labels only)
user-defined fields by name

System variables for sheet text:
# (sheet number)
## (sheet count)
SHEETPATH
SHEETNAME
SHEETFILENAME
user-defined fields by name

System variables for schematic text:
# (sheet number)
## (sheet count)
SHEETPATH
SHEETNAME
FILENAME
PROJECTNAME

System variables for footprint text:
REFERENCE
VALUE
LAYER
FOOTPRINT_LIBRARY
FOOTPRINT_NAME
NET_NAME(<pad number>)
NET_CLASS(<pad number>)
PIN_NAME(<pad number>)
associated symbol’s fields by name

System variables for PCB text:
LAYER

System variables for worksheet text:
KICAD_VERSION
# (sheet number)
## (sheet count)
SHEETNAME
FILENAME
PAPER
LAYER
ISSUE_DATE
REVISION
TITLE
COMPANY
COMMENT0, COMMENT1 … COMMENT9

You can also search the code for ::ResolveTextVar.

4 Likes

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

@JeffYoung , do you happen to remember if the latest list is still up to date? The official documentation is still TBD for text variables…

Yes, I believe that list is still correct.

It’s not yet in the documentation yet, so I just created:

Note, that repo is for the developer documentation, not the user-facing documentation. You want kicad-doc.

Do we have a variable yet for the current date/time to put on schematic title blocks? Issue date is blank until it is issued, but I print a schematic periodically as I design a board, and really miss the date/time-printed that eagle provided.

You can thumbs-up this issue: Feature request: Extend system strings by the current date (#6121) · Issues · KiCad / KiCad Source Code / kicad · GitLab

There’s a linked merge request to implement the feature, but I’m not sure what the status is.

thanks – I’d give it a thumbs up but looks like it needs an account there (and I don’t have one)

Actually, there is ${CURRENT_DATE} that at least gives you today’s date. Can’t help you with time, though.

1 Like

Ahh, nice! I will add that as date-printed to my schematic title block.
Thanks!

I was curious if anyone knows if there will be support for PCB stackup variable names? It would be nice to have a simple footprint that was the stackup table that could be added to the PCB artwork with all the stackup values needed for FAB. This is a very manual process at the moment. If there is a plugin that does this that would also be nice.

something different from what you get from:
place -> add stackup table ?

2 Likes

Wicked, I didn’t see this :slight_smile: very happy now!

1 Like