${SHEETNAME} returns null on Page 1 (should be "Root")

As per this page: New string replacement options for kicad assets
the string replacement SHEETNAME returns the name of the active sheet, which seems to work well in my custom worksheet, except for page 1 (Root) of the schematic where this field is empty.
I am expecting this to read Root just like it appears in the schematic hierarchy navigator.

I believe this is a bug, easy-to-fix however

Bonus:
If the same worksheet is applied to the pcb editor then SHEETNAME would not make sense as there currently can be only one layout per project (I believe we already have that discussion elsewhere) so what string should be returned here?

What’s your KiCad version and platform? Always state those when asking about a possible bug. It’s possible you’re not up to date with the latest version and it’s already fixed.

OOps!! :slight_smile: Here goes:

Application: KiCad x64 on x64

Version: 7.0.9, release build

Libraries:
wxWidgets 3.2.3
FreeType 2.12.1
HarfBuzz 8.2.1
FontConfig 2.14.2
libcurl/8.4.0-DEV Schannel zlib/1.3

Platform: Windows 11 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Nov 5 2023 19:26:40
wxWidgets: 3.2.3 (wchar_t,wx containers)
Boost: 1.83.0
OCC: 7.7.1
Curl: 8.4.0-DEV
ngspice: 41
Compiler: Visual C++ 1936 without C++ ABI

Build settings:
KICAD_SPICE=ON

Root Sheet name – without solution, but maybe it’s in the issue database?

Ohh yes, the illusive issue database… I know I have browsed it intensively 1-2 years back but nowadays I can’t seem to google it. If only there was an easy to find project index… :grin:

I fixed it in master, not sure how soon it will make it to stable, maybe 7.0.10. It will display “Root” until we add the ability to change the root sheet name.

2 Likes

My hero!!!

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