Error in sch file format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Expired
|
Undecided
|
Unassigned |
Bug Description
I am making python scrip for cloning the part of the layout while making netlist in sync with the already annotated schematic.
I made couple of copies of hierarchical sheets using command "File/append schematic sheet".
Script that I am talking about reads the hierarchical sheets .sch files in order to determine which footprint in layout to rename.
The script actually works and I am able to make copy of layout but I notice that there are couple of capacitors and resistor that are not copied, so I investigate what is going on.... so I printed every component that script deals with and found that there are components with C? or R? names.
The script threat the schematic files like read only files, so they are not altered by it.
At the schematic files .sch there are couple of components with the "?" in its name.
Like this:
$Comp
L C C?
U 1 1 56F649D8
P 16050 7400
AR Path="/
AR Path="/
AR Path="/
AR Path="/
F 0 "C56" H 16075 7500 50 0000 L CNN
F 1 "10nF" H 16075 7300 50 0000 L CNN
F 2 "C_0603_H" H 16088 7250 30 0000 C CNN
F 3 "" H 16050 7400 60 0000 C CNN
1 16050 7400
1 0 0 -1
$EndComp
So the script read this component like C? and can't find its match at some other hierarchical sheets in order to clone the circuit.
If I understand KiCAD "file formats" PDF the component name should be located at the next line from "$Comp" line.
When you look at the schematic that component has C56 name-designator and also at the pcbnew that component is C56.
Maybe KiCAD using this line "F 0 "C56" H 16075 7500 50 0000 L CNN" instead of this line: "L C C?" ?
Thanks,
Petar
Your point is not really clear for me:
is there a problem with initial sch file, or with your running script?
In your first sentence you mention " already annotated schematic". If original (before running script) schematic contains "C?" references, it is not fully annotated.
If you see "C?" after running script, then it's fine, as original "C56" should be copied into "C?" to avoid duplicate references and must be annotated later. Or your script makes automatic annotation of new distinc references?
So please put this in perspective.