How to copy line art from one PCB to another

I have some line art I created to show the board stack up in the first board I made in KiCad, its quite extensive and I would like to copy an paste it from the old board to the new board. Is this possible (or can it be done through some kind of export functionality)?

Thanks,

Jacob

Copy the first board, trim everything except your line art, save the file.
Open PCBNew in standalone mode (invoked directly from your OS shell), open your new project, and use File > Append board command to open your prepared Line art file prepared in earlier step.

I recently did this and was concerned about how to copy the stack and fab info I added to the eco1 layer.

  1. save a copy of the PCB file
  2. open the copy in pcbnew
  3. DELETE everything that you don’t want to duplicate
  4. save
  5. open in a text editor
  6. copy the lines that are not part of the file format
  7. open original
  8. paste at the end within the brackets

Thanks Naib,

That seems like it will work in theory, but after spending 15 minutes on it and not getting it to work I’m starting to feel like it would be easier to redraw the line art. :frowning:

Jacob

Ah, stupid me, I had the fab layer turned off in my pcb file. It worked perfectly and way faster than redrawing.

Jacob

But why edit kicad files directly (taking risk of breaking the file), if there’s user level function to do just that via the GUI?

there isn’t though, that’s the problem

There is, just like fred4u told. Actually there’s even an easier way.

  1. Open your target project and the pcb there.
  2. Open the source pcb file (with the “line art”) in a standalone Pcbnew instance or in another KiCad project instance.
  3. Select and copy the art (Ctrl+C).
  4. Paste to the target.

Just how you would copy and paste in any other software.

1 Like

Anyway, such a trivial (at least from user’s point of view) operation is still quite awkward with current Kicads. This whole “standalone mode” / “project mode” approach is far from being intuitive - as the OP’s question frequents this forum.
Do you know of any major improvements to the whole copy/paste mechanism for the upcoming next big release (v6)?

Even in 5.1 copypaste works between Pcbnew windows. The problem of two modes is a different matter. I don’t know how copypaste could be easier because it already works just like in any software. How else would you copypaste between two different files?

The differences between v5 and v6 are that copypaste works in eeschema, too; and the system clipboard is used so that it’s possible to for example paste a part of a pcb design to a text editor.

1 Like

ok thats odd…
I recently did exactly what the OP was after (eco1_user contains additional information) and I needed to replicate similar info to the other boards & then edit.

I tried exactly that and it didn’t work, thats why I went the copy-paste of the raw pcb file data

Now I just tried it and it behaves exactly as you stated. Oh well :slight_smile: multiple ways as least.

Being able to use plain text is of course a strength of KiCad.

1 Like

Just checked and thanks, it works for PCBNew, was sure that I can’t close PCBNew window to retain the clipboard.
I’m happy to hear EESCHEMA is getting “civilized” with the new release.

For me the intuitive way would be to export the border and then import it somewhere else, unfortunately there is export in SVG but not import and there is import of DXF but not export, so at the moment not possible. :man_shrugging:

yup I spotted that.

Now v6 has an interesting feature that makes this redundant as it can insert a stackup table into the pcb

But there is:
Pcbnew / File / Plot / Plot format: DXF

I am experimenting a bit with it now, but it works strangely.
After plotting to dxf as mm instead of inches, I managed to first plot the board to DXF (which creates a file for each layer), and then Pcbnew / File / Import / Import Graphics and I imported the F_CU layer onto the silkscreen.
Result was an outline of all copper tracks, but it does work.

The downside of that is it is graphics not text. Take the below, which is the style I have settled on.

This is the first thing I tried., it didn’t work. I’m using 5.1.6 in Ubuntu.

Jacob

I did that with 5.1.7 on Windows.

Works for me too with KiCad V5.1.8 and Linux Mint.
I opened 2 PCB’s in 2 standalone instances of Pcbnew, did a copy in one and pasted in the other Pcbnew instance.

Application: Pcbnew
Version: 5.1.8-db9833491~87~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-52-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.68.0
Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON