Closed FutureEngineeer closed 1 year ago
Can't find this token in the KiCad documentation for schematic symbols ..
What KiCad version your file belongs to? In KiCad 6, the lib name might be insoide of "lib_id", we are currently discussing similar changes for the Library Symbol class in #41
Can you provide a full example of what you are trying to parse?
SWD_via_USB-C.zip When creating an alternative version of a symbol directly in the schema (KiCad 6), it adds an additional prefix _1 or higher to the lib id, depending on the number of variations of the modified library symbols in the schema. If the libname field is missing, then such components are no longer displayed in the schema after saving. After these changes in the code, the problem was solved
It wouldn't be the first time that a token is missing in the KiCad documentation. I'm going to take a closer look on this later this week, thanks for sharing the example.
Description: The optional field "lib_name" is missing in schematicSymbols and is used to create alternative symbols directly in the schematic. As a result, components modified in the schematic are not displayed.
Example from schematic file: (symbol (lib_id "") (lib_name "USBLC6-4SC6_1") (at 43.18 135.89 0) (unit 1)
Solution: The field can be added by adding the following code to the class SchematicSymbol() in schitems.py: