3D Model path changes

I have a question around how to adapt an existing project to the latest directory structure where the 3D models have moved to a new branch in the tree. The effect of this move is to break the links. New components added appear, but ones already there don’t show up.

Updating is a simple but tedious matter of re-associating each component with the new path. Hopefully there is a better way - but what is it? Global search and replace of the old path to the new one perhaps?

EDIT - Turned out something has gone wrong with the paths so the fix was relatively easy except for a few hard coded parts. Anyway in case it helps anyone seeing the same thing look at the default path definitions for erroneous directories.

If I look at the properties of a capacitor footprint in Pcbnew, then it looks like:

As you can see, the 3D settings tab uses a relative path name with the environment variable KISYS3DMOD.

And you can set that in KiCad Project Manager / Preferences / Configure Paths

But you write you can see some (newer) 3D models, which implies that this is set up correctly. Going back to your problem, I can not deduce what is happening, and where it goes wrong, and therefore also do not have a better answer.

Euhm, after re-reading your post I see your edit and that you’ve already solved it.

Hacking into KiCad’s files with a text editor is a viable option, but it’s much less needed these days.

Yes, thanks. Some of these problems are self inflicted with a network drive that appears under different drive letters on various PCs. I wish there was an easy way to copy all 3D models used into the working directory because that would then be portable and when you come back to a project ten years later the now obsolete files are still available. You can also edit them there, unlike in Windows Program Files.

In this case though the problem was caused by there being two versions of KiCad on my PC, 32 bit and 64 bit. I deleted the 32 bit but, for some reason, the directory was still pointing there.

3d is incredibly useful when you are trying to determine mechanical issues, like if a project will fit into a case.

Because its FOSS, there are quite a lot of people who write stuff around KiCad. There are over 60 scripts and other side projects. Some of them are especially made for making KiCad projects portable or archive-able. For example:

https://github.com/MitjaNemec/Kicad_action_plugins/tree/master/archive_project