request:resolve imported eagle7.7 attributes
Description
Currently, Eagle attribute references, at different levels, are not imported the optimal way. KiCad seems to treat "custom values" the same way as Ealge treats attributes. I do not know if there is a history behind the wording of these fields. To me they behave like attributes in other application so I find this a good name. Basically an attribute in eagle is referred to with a string starting with '>' followed by the attribute name [no whitespaces], optionally one space (**), then EOS. No other ends, including linefeed, are valid attribute references. Text with this ">attribute_name" format can be imported as "${attribute_name}" in KiCad. It also means that the string ">BLABLA is not an attribute" will not get the BLABLA replaced, as it is not an attribute string.
(**) This is probably an Eagle bug. This space is ignored. This case relates a bit to:
Case1: #13468 (comment 1266417739)
Case2: #13542 (comment 1243190057)
Note, Eagle also have an option to "write protect" attributes so they can not be changed at instance level. KiCad does not seem to support this feature yet, but it should not hold back the request described above.
Steps to reproduce
- Try related case1 to see the result of symbol related attributes. Try edit the symbols "unitJ" and replace all >VCCIOx with ${VCCIOx} and note the difference. Maybe you can also see the usefulness if you display the same attributes in the related VCCIO bank symbols (they were not included in the original Eagle symbol, but this was a quick example generated)
- Try related case2 to see the result of global attribute. >CUSTOMATTRIBUTE text should have been replaced with ${CUSTOMATTRIBUTE} and Schematic_setup->Project->Text Variables should contain variable name CUSTOMATTRIBUTE with text substitution resolved to "This is a custom global attribute with ~{bar} and \backslash test".
KiCad Version
Application: KiCad Schematic Editor x64 on x64
Version: (7.0.0-rc2-224-g3ecd6ec186), release build
Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.0.1
FontConfig 2.14.1
libcurl/7.83.1-DEV Schannel zlib/1.2.13
Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Feb 6 2023 06:17:37
wxWidgets: 3.2.1 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.2
Curl: 7.83.1-DEV
ngspice: 39
Compiler: Visual C++ 1934 without C++ ABI
Build settings:
KICAD_SPICE=ON