From fcdedad360dba4e5e7cc45cf5a488ec7ffb2b322 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 12 Aug 2022 09:03:31 -0300 Subject: [PATCH] [SCH][KiCad 6][Fixed] Instance data partially applied - The component instance information was applied to the component, but not to the "basic" fields. --- kibot/kicad/v6_sch.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kibot/kicad/v6_sch.py b/kibot/kicad/v6_sch.py index 30edee89..3f0c9cd1 100644 --- a/kibot/kicad/v6_sch.py +++ b/kibot/kicad/v6_sch.py @@ -992,6 +992,11 @@ class SchematicComponentV6(SchematicComponent): if not m: raise SchError('Malformed component reference `{}`'.format(ref)) self.ref_prefix, self.ref_suffix = m.groups() + self.set_field('Reference', ref) + + def set_value(self, value): + self.value = value + self.set_field('Value', value) def set_footprint(self, fp): res = fp.split(':') @@ -1004,6 +1009,7 @@ class SchematicComponentV6(SchematicComponent): self.footprint = res[1] else: raise SchError('Footprint with more than one colon (`{}`)'.format(fp)) + self.set_field('Footprint', fp) @staticmethod def get_lib_and_name(comp, i, name): @@ -1907,7 +1913,7 @@ class SchematicV6(Schematic): # Transfer the instance data comp.set_ref(s.reference) comp.unit = s.unit - comp.value = s.value + comp.set_value(s.value) comp.set_footprint(s.footprint) comp.sheet_path = path comp.sheet_path_h = self.path_to_human(path)