Hi Nick,
the documentation helped, but the c description is way more better.
Thanks for help.
But may it be that there are some defines & functions missing in the
pcbnew.py?
E.g.
1. Segvia not defined?
2. Layer defines not available: (eg. track.SetLayer(LAYER_N_BACK))
Maybe it would help to regenerate those scripting files?
At the moment I'm trying to generate a track:
====
#!/usr/bin/env python
from pcbnew import *
# create a blank board
pcb = BOARD()
#Track
track=TRACK(pcb);
track.SetStart(wxPointMM(50,50));
track.SetEnd(wxPointMM(50,60));
track.SetLayer(LAYER_N_BACK)
pcb.Add(track) # add it to our pcb
pcb.Save("myfirstvia.kicad_pcb")
===
- Michael
On 28.08.2014 00:37, Nick Østergaard wrote:
Hi Michael
There is http://dev.kicad-pcb.org/doxygen-python/ , but I am not sure
how and when that is updated. But you can also generate the
documentation yourself with 'make doxygen-python' in the soruce tree.
Nick
2014-08-27 23:12 GMT+02:00 Michael Heidinger <mch.heidin...@gmx.de>:
Hello,
I have a basic question: Is there a scripting documentation online? Where
all the commands e.g.
used in the link below are explained? Maybe that would clarify also my
questions below.
I've seen that python interface is generated automatically, but where do I
find the c documentation?
I tested out the scripting online:
https://github.com/KiCad/kicad-source-mirror/blob/master/pcbnew/scripting/examples/listPcb.py#L2
There seem to be some errors:
Line17: SegVia not defined.
Line55: Zones are empty.
Line60: Ratesnest returns (always?) zero
Line62: GetNetClasses() produces error.
Please help!
- Michael
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp