Access UUID inside schematic files

How do i access the UUID of the schematic object inside schematic editor? I mean the UUID is very central to many resolutions inside kicad i would like to be able to manipulate it since it affects the behavior down the line.

So for example i would like to replace one object with another but keep the UUID!

As far as I know, you should never have to have to mess with the UUID’s directly.
A long time ago, when viewing the properties of a schematic symbol, you could see the hexadecimal “timestamp” (Predecessor of the UUID, maybe KiCad V4?) and as I recall this was removed because you should not handle it directly.

In your use case, do not delete a schematic symbol and replace it with a new one, but use: Schematic Editor / Tools / Edit Symbol Library Links. With that tool you can exchange the graphics of a schematic symbol with another symbol, and it should (I have not verified) not change the UUID.

Do you have other use cases in mind?

1 Like

I have checked it.
I placed at empty schematic one 0R resistor and saved the schematic.
Then I right-clicked my resistor and selected “Change Symbol…”
Then I selected New library identifier by searching in librery - I selected my 10R resistor.
I also checked to update not only Footprint and Datasheet but also Value.
Then I have saved the schematic.
I compared two schematic files. I have never before looked into the schematic files.
I see there two UUIDs. One is probably for schematic and one for resistor.
In both files they are the same.

2 Likes

Well i was looking at changing UUID’s of junctions, eires and also symbols that have been changed only in the schematic.

They are not accessible to the GUI and never will be.

1 Like

Oh ok. But could you guys consider as tool or action that allows me to replace one with another that would be fine too.

For me till now you not explained clearly enough what you really need to get and why.
It looks for me that Notepad++ can be a tool you are looking for.

Yeah, well i can do it in text editor no problem. But its easier to identify which i which in the GUI

Read the post from marekr again.

@paulvdh well i wouldn’t be changing it jut replacing it with another instance. Well anyway i suppose i can program this myself.

And also, again, why do you want to have access to the UUID’s?

Your first example is not valid because KiCad already has a better interface for handling it, and I wrote that in my first response.

If there are other use cases where direct access to the UUID’s is beneficial, then a better solution is probably a change in KiCad to make access to the UUID’s for that case also unnecessary.

2 Likes

I already forked the codebase. Changed the code so that i can change the order of nodes nets without relying on file sorting by UUID, And what do you know nearly 90% of my 3 way merges of in kicad_sch files now work magically.

Currently implementing possibility to put 3 version on top of each other to create a manual merge without causing too much change in file. But im afraid my summer code window closes tomorrow.

then a better solution is probably a change in KiCad to make access to the UUID’s for that case also unnecessary.

I agree. But when i bought up a better way to handle the entire thing nobody was interested

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.