Replies: 3 comments 1 reply
-
|
I'll take a look at this. I'll have to setup a Windows VM. It looks like you're running KiCad 6? |
Beta Was this translation helpful? Give feedback.
-
|
I think the easiest thing to do is use the Python executable bundled with KiCad. The following is what I did for KiCad 6 running on a Windows 10 VM.
from skidl import *
# Tell SKiDL where the symbol libraries are.
lib_search_paths['kicad'].append('C:/Program Files/KiCad/6.0/share/kicad/symbols')
anodes = Bus('a', 6)
cathodes = Bus('k', 16)
led = Part('Device', 'D', footprint='Diode_SMD:D_0201_0603Metric', dest=TEMPLATE)
for a in anodes[1:4]:
for k in cathodes[1:15]:
led()['A', 'K'] += a, k
for i in range(2,6):
for k in cathodes[i:i+10:5]:
led()['A', 'K'] += anodes[5], k
ERC()
# Tell kinet2pcb where the footprint libraries are.
generate_pcb(fp_libs='C:/Program Files/KiCad/6.0/share/kicad/footprints')
This should create a |
Beta Was this translation helpful? Give feedback.
-
|
Had the same problem since I used venv which didn't include the PYTHONPATHs like my system python. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry for bothering again, this time I was trying to generate PCB directly from python code using generate_pcb() command mentioned in this book: https://shanemmattner.github.io/skidl_jupyter_book/chapter1/02_basic_usage.html
Warning message says kinet2pcb is missing though it already installed. When I try to import kinet2pcb directly into python shell it gives "No module named 'pcbnew'" error.
I've found pcbnew.py in KiCad dir and added to PYTHONPATH, then error changed to " DLL load failed while importing _pcbnew: Module not found" and on this point I'm out of ideas how it can be fixed.
led.py code the same like in this discussion: #211 with only one change
generate_pcb()instead of
generate_netlist()Issue present both on Windows and Mac machines.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions