Reference to other project in the .kicad_sch (V8)

Hi,
Using V8 on Windows.

I’ve looked inside my kicad_sch file, and some of my symbols are a bit strange. it has this :

	(instances
		(project "OctopussySweepL"
			(path "/87a2c8ce-2a25-40b2-a978-4915b4e503f4/00000000-0000-0000-0000-00005a798389"
				(reference "CAN_1")
				(unit 1)
			)
			(path "/87a2c8ce-2a25-40b2-a978-4915b4e503f4/4469e890-7969-4bbf-a3d6-169fa73edd8f"
				(reference "J12")
				(unit 1)
			)
		)
		(project "boiteelecSweepL"
			(path "/d6a3643e-f2e8-46ce-8191-789440327483/f1c309cb-63db-48e0-9cba-71cb42458409"
				(reference "J74")
				(unit 1)
			)
		)
	)

I’ve got this symbol in the project by doing a copy paste from another project (I did it a while ago under version 7 (do know which).
But why does the symbol kept a reference of the copy/paste source project.

my current project is boiteelecSweepL, so there should not be any thing about OctopussySweepL which is just another of my kicad project.

Am I misunderstanding something ?

Another thing messed up on the same symbol :

but in the kicad_sch, I have :

	(symbol
	...
		(uuid "1867d5dc-a4fa-4c2f-ae83-9c6a12a33d8a")
		(property "Reference" "CAN_1"
			(at 223.52 118.11 0)
			(effects
				(font
					(size 1.27 1.27)
				)
			)
		)
...
		(instances
			(project "OctopussySweepL"
				(path "/87a2c8ce-2a25-40b2-a978-4915b4e503f4/00000000-0000-0000-0000-00005a798389"
					(reference "CAN_1")
					(unit 1)
				)
				(path "/87a2c8ce-2a25-40b2-a978-4915b4e503f4/4469e890-7969-4bbf-a3d6-169fa73edd8f"
					(reference "J12")
					(unit 1)
				)
			)
			(project "boiteelecSweepL"
				(path "/d6a3643e-f2e8-46ce-8191-789440327483/f1c309cb-63db-48e0-9cba-71cb42458409"
					(reference "J74")
					(unit 1)
				)
			)
		)
	)

The first reference property (CAN_1) is not shown. but the one in the instance block is shown.
I don’t really care. But if I do a copy then paste special with keep reference ticked, my paste symbol is now called CAN_1

For information, this symbol is inside a hierachical sheet, it could have someting to do about it.

Also if I open the .kicad_sch file in standalone mode. It then show the Reference CAN_1 for this symbol. and not J74.

(Note I have the same issue in plenty of symbol in this project).

It does make sense as outside of the project kicad cannot know which instance entry to look at.

Also I have only one instance of the this schematic file in my project.

But I still don’t understand the instance entry in the file.

Interesting. I did a grep on my v7 .kicad_sch files and there are project objects from other unrelated projects in some of the schematic files. I assume they got there through cut and paste, but why I have no :eye: :deer: and they don’t seem to hurt anything.

in my case, the bug I have is when I try to do a copy then a paste special keep ref.

In fact I’m trying to move some of my schematic from one sheet to another one.
And kicad is then taking as the original reference the one from the other project.

If I delete the extra instance entry in the file, it does fixe the issue, but it’s a pain to do manually.
I don’t know if I could find a text editor aware of the S expression to make the manipulation simpler.

This description sounds like a bug. But it’s likely that this can only reproduced with your special project, so it would be good if you could attach a zipped project archive.(unmodified)

here is a small project showing the bug.
it has only one connector in the subsheet.

If you do copy, then paste special keeping the existing reference, the pasted referenced is changed from J58 to CAN_?
buginstance.7z (4.3 KB)

I’ve also create a bug report

Also, eventough it’s not a bug, I don’t understand why, when pasting symbol from another project, the instance field of the symbol is not cleared. So it’s keeping information about the source project for no reason.

After in my case it’sdoing something stupid with this stale information, and that is a bug.

In one of my cases I think I know why. It was a child sheet that I copied from one project to another. KiCad has no way of knowing if the sheet is referenced from more than one project.

The other case seems to have been caused by simple cut-and-paste.

My bug report is taken into account and it should be fixed in 8.0.2.

In the mean time I will edit manually my files to fix my issue. For that I’ll be using notepad++ setting the language (for syntax hilghlighting) in LISP. this allow to “collapse” the S-Expression. I’m saying it here as it may help other to edit their file.

2 Likes