Hi, we’re building an augmented reality debugging tool where the cross-probing behavior between schematic and layout is extended to physical PCB. In other words, selecting a component, traces, text, or pin in the EESchema causes the corresponding element in PCBNew to be selected. We want to extend that paradigm to show the corresponding element on your physical board to be highlighted as well in augmented reality. We also hoping to make the reverse work: pointing out an element on the physical printed circuit board will cause the corresponding elements to be selected in EESchema and PCBNew.
To be able to do this, we need a programmatic way of seeing what the user selects in EESchema/PCBNew and to send that to our external program. I see text update along the bottom of the windows in both programs when an element is seleted, but is there a way to get an event trigger with this information?
Also, for the reverse behavior, is there a way to programmatically select modules and have them highlight in the PCBNew window and the EESchema window? I have tried kicommand by @HiGreg (very cool plugin, check it out), but commands like “modules U1 matchreference setselect” don’t seem to cause elements in the canvas to show “selected” state.
Much thanks for any pointers!