Work in progress: Native Altium Importer

Hi,
I’ve been using v5.99 from ppa/ubuntu for a while now.
I would like to test the Altium importer, but I can’t find this option in the menu.

Do I need to download a specific version and compile?

@pedro At the moment the importer is hidden to normal users due to being incomplete. If you want to give it a try anyway, you will have to create a new advanced configuration variable. You’ll need to create a new file kicad_advanced in the KiCad configuration folder, if you don’t have it already. Then (as pointhi mentioned in his merge request):

Set PluginAltiumSch=1 in ~/.config/kicad/5.99/kicad_advanced for now.

3 Likes

If you’re not compiling, you’ll want to wait a day to get the new updates. What’s currently in your ppa build is the old “completely unusable” version (which is why it’s hidden behind the advanced config flag)

1 Like

I pushed some additional improvements onto master, like support for labels, bus_entries, and the usage of the correct schematic sheet size.

1 Like

To be exact the pcb import have been there for some time, but the schematic import have been behind an advanced configuration option. If it’s like that, two things have to be done:

EDIT: LOL, I didn’t notice Qbort’s message. The search result points to that post.

1 Like

Jeff has already started the port of our project. He seems to think the cleanup will be fairly easy. That’s great. While Altium was fine, we had a hard time finding people with a license. I’m hoping we will have better luck finding enough people with KiCad experience… so far it looks good. We have three people offering help.

Seems like the port is going well. There were some issues, but Jeff seems to have straightened that out. I don’t know if he intends to provide any feedback.

In the last week, I managed to improve board as well as schematic import, and fixed some bugs:

Board import:

  • support via records of size 74
  • support keepout arcs/tracks on multiple layers
  • fix netclass parsing
  • handle arcs in polygon/zone outlines
  • detect and ignore polygons which are invalid for KiCad (<2 points)
  • use center dimension of KiCad, instead of original workaround

Schematic import:

  • handle symbol names with spaces
  • parse symbol description, reference and fields (and place them on schematic)
  • parse some page settings
  • correctly handle multiunit symbols
  • parse power ports incl. all their different shapes
  • parse ports (for now, assume global labels)
  • parse sub-sheet entries (but not the sheet itself)

There are still quite a few issues (sometimes wires are disconnected, some arcs are not visible,…) but I’m happy for testers. I would suggest to focus on single-sheet import for now, to fix this one up. I will tackle multi-sheet import later.

To enable the schematic importer, people need to enable it in the advanced configuration options for now:

Set PluginAltiumSch=1 in ~/.config/kicad/5.99/kicad_advanced for now.

5 Likes

@pointhi For Ubuntu users, does it mean we can now use nightly builds instead of building KiCad from scratch?

@eeintech yes, my changes should be in the nightly builds, as long as they are up-to-date.

@pointhi Sweet, thanks!

Is there a plan for these importers (sch + pcb) to work together, as kicad native project files does? I mean - will the PCB be tied to / derived from schematic, so that pcbnew “Tools” -> “Update PCB from Schematic…” works in imported *.pcb_doc, tied to imported *.sch_doc?

This is a useful, kind of “worst case scenario to import” altium project, containing harnesses, ports, sheet hierarchy, net classes, graphical customizations… link to github

And output pdf for that project: link to pdf

I would like to try the Altium schematic importer, but I can’t find that option in eeschema.
I’ve made this file:

$ cat ~/.config/kicad/5.99/kicad_advanced
Set PluginAltiumSch=1

Next I start eeschema in stand alone mode, and click file->import->import non-kicad schematic.
Now I browse to the location of “Power Supply.SchDoc”, but I can’t see that file.
Next I click on the drop down button “All supported formats”. There I only see Cadstar and Eagle.

I assume I’m doing something wrong. What could it be?

My version:

Application: Eeschema

Version: (5.99.0-6627-g2d59bb815), debug build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.73.0 OpenSSL/1.1.1h zlib/1.2.11 zstd/1.4.5 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0

Platform: Linux 5.9.1-arch1-1 x86_64, 64 bit, Little endian, wxGTK, , tty

Build Info:
	Date: Oct 27 2020 19:03:50
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.72.0
	OCC: 7.4.0
	Curl: 7.73.0
	ngspice: 33
	Compiler: GCC 10.2.0 with C++ ABI 1014

Build settings:
	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_OCC=ON
	KICAD_SPICE=ON
	KICAD_STDLIB_DEBUG=OFF
	KICAD_STDLIB_LIGHT_DEBUG=OFF
	KICAD_SANITIZE=OFF

There is a plan, but dunno if this happens for v6. KiCad is already in feature freeze, and project import is a new feature. Schematic import is in alpha state, and hidden behind an advanced config flag. This allows me to have the code already integrated in the upstream project, without bothering users with a broken importer.

I would say, the more testing we see on those importers, the higher the chance we see schematic import enabled by default for v6, and perhaps even a project importer. If the other lead-devs permit, I can add an initial project importer behind such an advanced-config flag as well.


I think my quote was a bit misleading. Remove the Set from the line:

$ cat ~/.config/kicad/5.99/kicad_advanced
PluginAltiumSch=1

Here is a working “kicad_advanced” file from my appdata folder in windows (%appdata%\kicad\5.99) kicad_advanced (17 Bytes)

I didn’t find critical errors for current state of the schematic importer, except still “not implemented” features:

  1. Footprint field is not imported;
  2. Altium “Harness” objects are not imported (blue “cables” inside GitHub project provided earlier);
  3. Multisheet design;

I think I should not report these in GitLab issue tracker, I believe - you have them in mind :), right?

Regarding pcb importer - current state is almost perfect, I did not found any critical errors in it.

I’m not a lead-dev (not even a developer at all), but please do.

Hi, here is a workaround to have ability of “Tools” -> “Update PCB from schematic…” for whole altium project:

  1. Import schematics with standalone eeschema. *.kicad_pro file is automatically created;
  2. Import pcb with standalone pcbnew;
  3. “Tools” -> “Harvest footrpints to new library…”. We will create library, containing all pcb footprints;
  4. Close everything, open kicad_pcb files with text editor;
  5. Replace all references of non existing library names from altium, to our new library, created in step 3;
  6. Launch kicad, open *.kicad_pro file, created in step 1;
  7. Start pcbnew, “Tools” -> “Update Schematic from pcb…”. This will set correct footprint assignments from pcb to schematics;
  8. Save everything.
  9. “Tools” -> “Update PCB from schematics…” as sanity check.

Everything works, we can make changes inside eeschema and import them to pcbnew as native kicad project does.

An alternative to Steps 4, 5, 6 would be:

  1. Preferences, Manage FP Libraries
  2. Create a nickname for all references of non existing library names from altium, to our new library, created in step 3; Ie create several nicknames all pointing towards the newly created e.g. Library.pretty.
  3. Tools, Update FP from Library, all on board. You can iterate steps 5 and 6 checking the error messages in the dialog, until you find out all library names.

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