Am 2019-01-04 12:51, schrieb Brian Piccioni:
I am still keen to attempt to incorporate geographical component annotation into KiCad.
This could be an interesting feature. I'll be keen to see what you come up with.
The first thing I want to do is to add the ability for eeSchema to import a “was/is” file to update schematic annotation.
I would prefer that you avoid files in this action. They generally clutter the user space and have cross platform differences that can cause issues. Instead, I would recommend that you look at the KiwayMailIn() functions to define a new mail command from pcbnew -> eeschema. You could also define a command from eeschema to pcbnew requesting the position information.
1) Where are the file IO functions? I have searched for (for example) LoadProjectFIle and find the prototype but not the actual function. Similarly I find the prototype for SaveEEFile() but not the actual function.
I'd avoid these. They are generally listed as *_plugin.cpp in the relevant program directories. So eeschema has sch_plugin.cpp that is the base class for sch_legacy_plugin.cpp and sch_eagle_plugin.cpp. Similar things are done in pcbnew
2) I would like to copy as much of the existing code and dialogs as possible (i.e. make new dialog based off another dialog) but when I open, for example, dialog_annotate_base.h I see
All of the *_base files are generated from wxformbuilder. These are the *.fbp files. The files of the same name but without the _base extension are the overloaded classes that we write by hand.
3) There is a guide on the Kicad documentation “Tool framework” which describes adding a tool to PCBNew. Is there a similar guide to adding a tool/function to eeSchema? How do I go about this?
There is not currently a tool framework in Eeschema. This will be coming in v6. For now, I'd recommend not developing Eeschema tools as the framework will change. That said, your proposed addition does not sound like a tool but rather a command or plugin that can be run from the menus.
Best- Seth _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

