How to reuse a kicad project with a different filename

Hi,
I currently have a working kicad project called PCB. I use SVN for general back up and version control and this works fine. I want to experiment with this project to make some major changes, but at the same time i still want to be able to use the previous project, running 2 projects in parallel so to speak.

I have tried to archive the project, open it in a different location and then rename the pcbnew, project and schematic file to PCB_v2.

This works, i can edit the file and there is no problem.

The moment i import a new symbol, every single symbol is replaced by a question mark.

I just dont understand how this works at all. Can somebody point me in the right direction?

I will also quickly describe my procedures:
My kicad project folder contains:

  • A_Footprint_Library.pretty
  • Datasheets
  • Gerber
  • Imported footprints and files
  • the kicad generated files(including the symbol library dcm file)

This last folder i use to store my footprints that i download from snapeda.com. After i download them i do the following. In the footprint editor i do:

  • manage footprint libraries- global libraries - add exisiting library to table
    Then in the footprint editor i go to the imported library, and copy that footprint into A_Footprint_Library.pretty. This places the right filetype in the folder.

The symbol i just import by right clicking the library in symbol editor and import symbol. It adds it to it and it straight away works.

This has for me been the only way to work with kicad. Perhaps there is a major flaw in my process? Would love to hear it. I love kicad but i do get frustrated sometimes with the amount of time i waste on getting things like libraries to work.

Greetings

I don’t expect problems with copying one project, renaming and using, but:

  • I have and plan to have only one scheet schematics,
  • I didn’t reach a gerber stage yet.

In my working directory D:\Mm which I backup every day i made a KiCad directory and under it I made the directories for libraries:
D:\Mm\KiCad\_PcbLib
D:\Mm\KiCad\_SchLib
In my global library lists there are only libraries located in that directories.
And under KiCad I made project group directories and under them there will be single project directories.
I’m used to have all projects at the same directory depth what makes my hierarchy being not sensible if something is referenced as relative to current dir. For example if in Schematic File|Page Settings… my Page Layout would be addressed as …\…\_Mm\mm.kicad_wks (Edit: it is not easy to write such texts here - \ disapears, two dots are shown as three dots - I gave up with that dots) than it would still work if I copy the project to another directory location (at the same depth).
Just a moment ago from directory:
D:\Mm\KiCad\Bibi\BC00 I copied files: BC00.pro, BC00.sch and BC00.kicad_pcb to directory:
D:\Mm\KiCad\Test\Tmp1 and renamed them all respectively to Tmp1.*
I opened Tmp1 project and everything is working.
I didn’t copy BC00-cache.lib as my idea is to have at schematic only elements from libraries so now (when I from time to time change my mind in how elements will be divided into libraries and how libraries will be named) I delete cache.lib from time to time to be sure that I have only elements existing in libraries.
In month or two I expect my library structure will be frost and then I would be sure elements are from there ‘by default’.

See

Basically, in theory, these should be the steps which should work:

  1. Rename all files which have the name of the project as part of the file name.
  2. Do find&replace inside all files, replacing the old project name with the new one.

The problem you have is because the symbol library cache is referenced inside the schematic file and you renamed the cache file. EDIT: you didn’t copy it all. It’s needed for the symbols in the .sch file to work, and it’s referenced by name in the .sch file.

You do not have much experience with kicad do you?

Because it is not that easy! One really needs to take great care of the cache lib and rescue lib.

@eelik: the cache lib is not referenced but it really needs to have the same name as the project. The rescue lib (should it exist) is what will require either renaming in all files or you now have a rescue lib with a different name than the project.
See: https://bugs.launchpad.net/kicad/+bug/594051

2 Likes

EESchema Schematic File Version 4
LIBS:xxxxxx-cache

First two lines from a schematic file. I don’t know what it does, though. It’s not “referenced” in the same way than normal symbol library files, for example:

$Comp
L Connector_Generic:Conn_01x02 J1

You know that I don’t have much, but I have tried few times with few versions (starting from 4.0.7) and no problems noticed. I always (not KiCad) start new design from old one just to not have to set the same things again and again (I didn’t found the way how to prepare empty project and save it as template so I assume I will be copying).
But, as I pointed I have only one sheet schematics and I remember reading here that with more sheets there are some problems.

A version 5 project should not have libraries called out in its files. This is probably something left over from v4.

No, almost all projects I have - and definitely this one because it’s some weeks or months old - are created with v5.

I created new projects with v5.1 and v5.99. Both add that second line after I add a symbol and attach a footprint to it.

Strange as soon as one annotates this thing is added. Why would annotation change the file in that manner? I will open a bug report to ask about that as that line should either always be in the schematic or never be in there.

Update: Seems like these lines are ignored by the parser and nobody really even knows why they are generated.

1 Like

When I just want to make one project out of another one, I use the ‘project template’ system as discussed here:

Abusing it to clone any given project is discussed in the last 8 minutes or so. (Note that you will still have to make sure that things like library references are consistent as the contents of your project files will not be ‘adjusted’ as part of the process.)

Happy cloning!

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