Ah, I seeā¦
I enabled the trace output for the API subsystem. The strange thing is that after I did that the plugin icon was loaded. But I found a few issues and it still works after removing the environment variables again.
Thank you!
So, I am just trying to create the schematic and layout using Skidl but it is not working for creating schematic so now I get to know about this API. So any one please tell me that this API can be used for the above thing I mentioned.
There is no API for schematics yet, new API (and old one) is pcb only for now.
Thanks for the clarification qu1ck
Just wanted to make sure that my thank you post (Thank you. Thank you. Thank you) also reaches you directly
Since I donāt get much / any traction on my other posts and I really struggle with the documentation of the API, Iāll try to revive this post, maybe I can get more feedback here.
Posts I made that were left mostly unanswered:
Currently Iām struggling with the creation of a pad (that I use as a fake-via in a footprint). I got so far that I now have a plated hole, but I donāt understand how I create the annular ring / the pad itself. Currently Iāve got this:
fake_via = Pad()
fake_via.number = ""
fake_via.position = Vector2.from_xy_mm(10, 10)
fake_via.padstack.unconnected_layer_removal = True
fake_via.padstack.drill.diameter = Vector2.from_xy_mm(0.3, 0.3)
This seems to be the attribute Iām looking for. However, I have to set this per layer, which seems strange to me, because the UI in KiCad lets me set this as a āglobalā setting:
okay, slight progress, but I think I ran into a bug. I can set the pad diameter this way:
for layer in fake_via.padstack.copper_layers:
layer.size = Vector2.from_xy_mm(1, 1)
However, the created pad looks like this:
Note that the āPad Propertiesā dialog shows how I expect it to look, but it does look different on the board. Toggling a setting like āF.Maskā and then pressing OK fixes it on the board without changing anything. This seems like a bug that prevents the update of the pad.
@craftyjon Sorry for the ping, but it seems like no one is answering any of my posts about the API and I think you should be aware of this feedback. Especially since I think I ran into a second bug. Both of them could be related though, both of them look like as if some update has to be triggered in KiCad.
Edit: Iāve update to v9.0.2 and the behavior is unchanged.
Editt 2: I should also mention that I ran into issues every now and again if I have more than one KiCad instance open.
Trying to open a UI created with the IPC API from within KiCad creates this error:
This does not cause any problems when using the old SWIG bindings. Maybe it is an issue with my code, but the same code works with the old bindings.
Bugs should be reported on GitLab, please. Forum posts are not a place to report problems with the API, your issues will be lost.
My last report on GitLab regarding design rules was mostly ignored in the last three weeks, so I wanted to make sure it is an issue with the API and not my understanding of the API. Especially since Iām not sure if I should report that Iām unable to create pads - this could be entirely on my code, hence I asked for help.
But if you prefer, I can create a few issues.
I am currently unavailable to investigate bugs or give help, sorry. Maybe someone else will step in, otherwise please be patient. Issues are the best way to make sure that when I am available later on, things arenāt totally lost.
FYI, when padstack mode is simple, only the first (F_Cu) layer is used. Likewise when padstack is front/inner/back, only F_Cu, In1_Cu, and B_Cu are used.
ahh, that is good to know. That probably already resolves one of the issues I just created. I know you guys have lots of things to do, so I donāt blame you, but the documentation on the API is really bad. It is more helpful to look through the code than to actually take a look at the documentation.
I created a few issues
- IPC API: Unable to use when more than one KiCad instance is open (#20880) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
- IPC API: Visibility flags are ignored (#20882) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
- IPC API: Unable to create pads with actual copper (#20883) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
- IPC API: Missing UI parity when creating pad - no option to define pad size for all layers (#20884) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
- IPC API / debug window: print() is not forwarded (#20885) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
- IPC API: Disabling certain layers for pad (#20886) Ā· Issues Ā· KiCad / KiCad Source Code / kicad Ā· GitLab
You are welcome to submit changes that improve it. Using the API is expected to require looking through the code, though, at least in the near term. There has intentionally not been any effort put into documenting it to the level where people would be expected to get things done without ever looking at the code
The documentation also is never going to cover everything about how KiCad works, e.g. what is a padstack etc. The user is assumed to be knowledgeable about that.
Makes sense! I was just confused about the basically empty doc page.
I probably donāt have time next to work and trying to get this to work. But Iāll keep it in mind. For now I know too little to write any meaningful documentation
I am currently a developer working on kicad mcp. Iām trying to use the official IPC API rather than the swig API which will be deprecated, but Iāve found that the API for eeschema has not yet been developed.
Could you tell me when schematic related functions might be added? Or if I want to write or contribute related code, who should I talk to? Is there someone in charge of this area?
I donāt think there are concrete plans to when schematic api will be added. All Iāve heard is āpcb first, other parts of kicad laterā and pcb part is somewhat raw right now so it may be in v10, but most likely v11+.
Reach out to kicad devs on their mailing list if you want to help, they will provide guidance.
Thank you for checking. Iāll join the mailing list.