List of text variables available in 8.99 nightly builds

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
OP[:<pin name>|<pin number>|power][.<format specifier>]
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)
OP[.<format specifier>]
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.

Operating point format-specifiers contain a digit specifying the number of significant digits, followed by the units. A ~ can be substituted for the digit to specify auto-ranging. Examples: ${OP.~mV}, ${OP:d.3A}, ${OP:power.3W}.

2 Likes

@JeffYoung

Should this list also be in this thread?

Despite the title, these all work in 8.0 (although maybe Jeff has plans to add more and keep this thread updated :slight_smile: )

I had missed ${PAPER} and ${KICAD_VERSION} in the docs, though…

2 Likes

I placed a copy of this list in the FAQ for permanent easy access by members.
If there are plans for updates, I hope @JeffYoung uses the FAQ copy.

1 Like

A post was split to a new topic: List of variables availablein 8.99 nightly builds

If @JeffYoung does have plans to add more I would suggest adding the following to the Worksheet Text list:

DRAWN_BY
CHECKED_BY

these fields are standard fields in most drawings.

1 Like

${OP:\<pin name>|\<pin number> is currently broken in 8.0 (it expects a SPICE port name, and doesn’t convert the syntax correctly). That should be fixed in 8.0.2 or there-abouts…

Perfect. But I think it makes sense to update only this list for the nightlies, and then copy it back to the FAQ when we reach RC or sometime there-abouts.

(No doubt I’ll forget to do that (again) when the time comes, and @jmk will ably step in. :wink: )

Wouldn’t it just be easier to use one of the COMMENT1…COMMENT9 variables in the drawing sheet for those?

I use the comments to specify what has changed going from Rev A ->B, from B->C etc.

I use an added TEXT variable; DRAWN currently and have this added to my sheet template.

Of course, thinking about it, it’s not just a case of creating the new Text Variables they also have to be exposed in some way so the user can make use of them. :flushed:

Would you like me to add a Feature Request ?

I don’t think it makes sense to add a ton of hard-coded variables for various use cases like this. It’s a better fit for custom variables in my opinion

In general terms I would agree . . . I just don’t see Drawn By and Checked By (or similar) as a non standard use case, I think they should be very standard.

1 Like

If we added these I think they’d make more sense in the Title Block items in Page Settings. (They’d be more discoverable there.)

5 Likes

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