Using Macros within Schematic

I think this question has been asked a long time ago, but there was no reply. Is it possible to incorporate the use of a MACRO in eeschema or pcbnew?

What do you mean by “macro”?

But the answer is “no” anyways.

For example, I want to create my own dialog box which then calls one of the TOOL:ACTION functions in eeschema.

What is the intent? I am not good with any sort of programming…but I wonder whether smallbluebunny wants to replicate a pcb layout section or a schematic section with incremented reference designations? Such as R102 in one section is similar to R122 in another section and R142 in another?

See :slight_smile:

Aww! I love the link hehe :smile:
I realized that I was trying to call a wxWidget frame from a BASE_FRAME class and don’t think that is possible after all.

In eeschema, no not yet. Python scripting should be coming to eeschema. There is already Python scripting in pcbnew. AFAIK that is the closest to macros we have (will have in the near future) in KiCAD.

Granted I’m not sure of all of the differences between Macros and Scripting as lots of program suites conflate the two.

1 Like

Usually macros are a series of recorded user interactions - the user uses the normal UI and the series of actions is saved as a macro. They can be implemented as scripts which can be edited as a program. There are no that kind of macros in KiCad and I don’t remember reading anywhere about any plans or even discussions about that. KiCad has a scripting API for pcbnew, and as @SembazuruCDE said, an API is planned for eeschema.

There are people like @MitjaN and @qu1ck here who know more about the python API, but I’ve got a feeling that TOOL can’t be used through the API.


Yes, TOOL can’t be used in API (at least not without some nasty hacks) and eeschema doesn’t even have an api yet.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.