From bc793c863778e618052b679ff2dab9a6300deb7b Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 29 Aug 2022 08:37:12 -0300 Subject: [PATCH] [Fixed] Internal netlist generation when no lib Related to #242 --- CHANGELOG.md | 2 ++ kibot/kicad/v5_sch.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af419117..58fd28f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SCH Print and Netlist: name collisions. When the default name used by KiCad belongs to an already existing file. (#244) - Install checker: fixed problems to detect iBoM installed as plugin. (#209) +- Internal Netlist generation (i.e. iBoM with variants): problems withg + components that doesn't specify a library. (See #242) ### Changed - The order in which main sections are parsed is now fixed. diff --git a/kibot/kicad/v5_sch.py b/kibot/kicad/v5_sch.py index cf07edd1..8d5e900f 100644 --- a/kibot/kicad/v5_sch.py +++ b/kibot/kicad/v5_sch.py @@ -1949,7 +1949,11 @@ class Schematic(object): continue libpart = SubElement(libparts, 'libpart') res = k.split(':') - if res: + cres = len(res) + if cres == 1: + libpart.set('lib', '') + libpart.set('part', res[0]) + elif cres == 2: libpart.set('lib', res[0]) libpart.set('part', res[1]) if v.alias: