Visibility not working on "Value" field
Describe the bug I am working with a project that was imported from Altium. For all parts, the value is in a "ALTIUM_VALUE" field (not the default KiCAD "Value" field), and the default KiCAD "Value" field visibility is disabled.
I have used the excellent KiField to extract the parts list, copy the "ALTIUM_VALUE" field value to the "Value" field, and delete the "ALTIUM_VALUE" field value (therein deleting that field).
To enable visibility of the "Value" field, I prefixed the column header with [V], end result being [V]Value. But after inserting the file back to the schematic, the "Value" field visibility is not enabled. I tried again with the -w option, but still no success. I tried copying the "Value" column to a new "Value2" column, and inserted back to schematic, and that worked fine ("Value2" fields appeared, although in very random weird positions?). Bottom line, KiField fails to enable visibility for the "Value" field. I tried deleting the "Value" field values for all parts, inserting to the schematic, then loading schematic and verifying as expected, "Value" is empty (of course the default "Value" field cannot be deleted). I then entered the field values again in the spreadsheet, prefixed the heading with [V], inserted to the schematic. Loaded the schematic, and the "Value" values are present, but not visible.
To Reproduce Steps to reproduce the behavior:
- kifield -x .\theschematic.kicad_sch -i .\theschematic.xlsx
- Open spreadsheet.
- In spreadsheet, copy "ALTIUM_VALUE" column values into "Value" column values.
- In spreadsheet, delete "ALTIUM_VALUE" values (leave heading)
- Prefix "Value" heading with "[V]", result = "[V]Value"
- Save spreadsheet
- kifield -x .\theschematic.xlsx -i .\theschematic.kicad_sch
- Open schematic, observe "Value" field is not visible.
- kifield -w -x .\theschematic.xlsx -i .\theschematic.kicad_sch
- Open schematic, observe "Value" field is not visible.
- In spreadsheet, delete values in "Value" column, and remove "[V]" prefix.
- kifield -x .\theschematic.xlsx -i .\theschematic.kicad_sch
- Open schematic, observe "Value" field values are empty, as expected.
- In spreadsheet, re-insert values in "Value" column, and add "[V]" prefix.
- kifield -x .\theschematic.xlsx -i .\theschematic.kicad_sch
- Open schematic, observe "Value" field values are populated, but not visible.
- repeat steps 11-16, but also use "-w" option.
- In spreadsheet, add a "[V]Value2" column, copying values from "Value" column.
- kifield -x .\theschematic.xlsx -i .\theschematic.kicad_sch
- Open schematic, observe "Value2" field values are populated and visible.
Expected behavior "Value" field should be visible as a result of the above steps.
Screenshots
Desktop (please complete the following information):
- Windows 10
- Python 3.10.1
- KiField 1.0.1
- KiCad 8.0.1 (please don't dismiss this as due to KiCad v8... the schematic file format is same as v7)
Additional context I suspect this issue has to do with "Value" field being a built-in (not custom) field, and is thus handled differently somehow, either by KiCad, or KiField, or both.