Import Footprint... file dialog doesn't have filter for .mod files

Bug #1830352 reported by eelik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

The file dialog opened by Import Footprint from KiCad file shows some file formats but not .mod, the older KiCad footprint format (nowadays exported by SnapEDA). I had to change the filter to *.*. It could be even active by default with .kicad.mod.

Application: kicad
Version: (5.1.2)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

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

Tags: import pcbnew ui
tags: added: pcbnew
Changed in kicad:
importance: Undecided → Low
milestone: none → 5.1.3
status: New → Triaged
Revision history for this message
jean-pierre charras (jp-charras) wrote :

.mod files are footprint libraries, and contain many footprints.

Therefore you cannot actually imports a footprint from a .mod file.
You need to load the file and then select the footprint.

Importing from .mod file loads the first footprint in list, that is not necessary what we want.

Changed in kicad:
importance: Low → Undecided
milestone: 5.1.3 → none
status: Triaged → Won't Fix
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

JP is correct. The legacy footprint library file format could contain more than one footprint. While this patch may actually work, it is not correct. To implement this properly, the user should be presented with a list of all of the footprints to import so they can select the footprint(s) to be imported. Prior to the s-expr footprint library file format, we used to export a single footprint to a *.emp file which was basically the *.mod format with a different header (at least I think it was a different header). To use a legacy footprint library (even if it only contains a single footprint) you need to add it to your footprint library table. From there you can export it to the new file format and then import it. I'm fine with adding this feature but I don't think it has a lot of value.

Changed in kicad:
importance: Undecided → Wishlist
Revision history for this message
Seth Hillbrand (sethh) wrote :

While the basic patch of just adding the first might be incomplete, I think there's still a useful application to import footprints from .mod files. Particularly because places like SnapEDA distribute their KiCad footprints in .mod files.

This might be as simple as a dialog saying "The XXX.mod library contains YY footprints. Do you wish to import them to ZZZ Library?" and then import all.

Changed in kicad:
importance: Wishlist → Low
milestone: none → 6.0.0-rc1
status: Won't Fix → Triaged
Revision history for this message
Seth Hillbrand (sethh) wrote :

Oops, I see Wayne and I cross-posted.

@Wayne, the primary value I see with this patch is eliminating the extra steps of adding an old library to get the footprint(s), copy/pasting and then removing the old library. I like your idea of the list dialog as well.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Seth, no problem. This is definitely more than the simple patch that Michael provided in order to implement correctly. I'm fine with adding this to v6. We can always cherry-pick it to 5.1 if the master branch hasn't diverged too much by the time some one gets around to it.

tags: added: import ui
Jeff Young (jeyjey)
summary: - Import Footprint from KiCad File dialog doesn't have filter for .mod
- files
+ Import Footprint... file dialog doesn't have filter for .mod files
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1901

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Low → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.