← Back to team overview

kicad-developers team mailing list archive

Re: Driving the pcbnew UI from python

 

Tom,

Did answering your question resolve the questions you asked below?  I
apologize for being brief but I'm really busy trying to get a new stable
release of KiCad out so please be patient.

Wayne

On 2/4/2018 11:48 AM, Tom Cook wrote:
> Hello,
> 
> I'm developing a small Python application for tracking component
> inventory & to help when assembling boards.  I'd like to be able to
> display a portion of the board layout with a particular component
> centred.  This could either be in my application window or in a separate
> window, I'm not too worried which.  The display doesn't necessarily need
> to be interactive, though the ability to pan & zoom would be nice to have.
> 
> What's the most straightforward way to do this in pcbnew currently?
> 
> I can see three possibilities:
> 
> 1.  I think it's possible to launch pcbnew as a separate process and
> send it messages to focus a particular component through KiWay.  Could
> someone confirm that this is possible in a separate process and perhaps
> point me towards some documentation or example code for how to do this
> in python.
> 
> 2.  I think it's possible for a python process to be the 'top' for
> pcbnew - so I should be able to load pcbnew in my python process and
> display the UI and send it in-process KiWay messages.  Could someone
> confirm that this is possible and again perhaps point me towards
> documentation or examples?
> 
> 3.  I'm not sure if it's possible to load a board using the python
> pcbnew.LoadBoard() and then render a portion of it in-memory, which I
> could then display in my application.  Is this possible?
> 
> Thanks for any help,
> Tom Cook
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References