Recently I started learning Python, I’ll get the hang of it but it may not very easy to learn for non-programmers.
I also recently played with Eagle ULPs, they are quite powerful, have a C like syntax, but have a BASIC like ease of use. Other tools for engineers often used BASIC like languages in the past, possibly they are becoming more C like today.
So for those non-programmers out there, I have a question:
What type of language would you prefer for writing KiCad scripts?
Python (current method)
Like BASIC
Like Eagle ULP
Other
I am not interested in scripts!
0voters
I am just dipping a toe in the water here, it might be a dead end, so any constructive ideas welcome.
Edit: I meant Eagle ULPs, not Eagle command scripts
Your reference to Eagle Scripts are more properly called .ulps (use programming language).
I would prefer an interface like Eagles’ command language. Macros or command line scripts (.scr) would be a LOT easier for non programmers. Every menu command, parameter, etc, can be issued as a line of text, chained together sequentially and repeated to do what would be tedious tasks with the mouse. A series of keystrokes and menu selections assigned to a single key or written to a named file to be executed on command. In Eagle, command scripts can also call .ulps when necessary. Command Scripts can be used to set up eagle for a particular design task instead of doing it manually.
In short, everything that you can do with the mouse and menu selection can be done with a stored .scr file. Think of it as a shell language for KICad. KiShell anyone?
Well, I had never used Eagle before but after a quick Google I had a simple ULP script going. It’s a hell of a lot easier than KiCad. I’ve still not managed to get a python script to run.
I never had run a KiCad script. From long time I even didn’t know about its existence!
I think they need a better UI integration and easy of use so users can start notice it.
Another language suggestion: LUA ?
True. I have very little coding experience and would very much prefer macros with just a simple record and play function for repetitive tasks. Although scripts are powerful, it doesn’t help me since I don’t master it. So what’s the reason for macros being removed from Kicad?
I don’t know Python, but know a few others. It looks to me like the error is being thrown by pcbnew.py. In most languages, something like “getattr” would be a function that returns a particular attribute (sometimes referred to as properties) of an object (ex: objectname.getPrice or objectname->getPrice). The error is stating the object doesn’t have an attribute named ‘getattr_’. You would need to determine exactly what properties/attributes that particular object has available. I hope I made sense, here.
Users have complained in the past the macro code doesn’t do anything
useful and I could never get it to anything useful either. I sent out
message over a week ago about getting rid of the macro code. No one
complained including you. You should have spoke up so I didn’t waste my
time removing it. I’m curious exactly what it is you are using them for
because I cannot seem to record anything useful.
Wayne
tldr; there were too many bugs in the macro code and no one has volunteered to fix them.
Thanks for the info. Well, I fully understand why it’s being removed if no one wants to fix the code. Pity though, macros are really quite useful when you need to take care of different shortcomings in an application. I have a problem right now that easily could have been solved with a macro, instead I have to click and change properties for every single footprint on my current board.
Yes, I’m aware of your problem which is why I started this topic.
Hey, thanks for reading my post
A global edit feature would have been nice but something similar to “Actions” used in Photoshop would be fantastic. I understand the scope quickly becomes big and complicated to code, but if I just could wish for something;
Invoke a small popup window where you first define a new macro (“action”), then push the record button to record your actions; mark an object (footprint, track or via), call a function from the meny or change its properties (except for position).Then a Stop and Save Macro to file. Since there aren’t any list of objects available, maybe a multi-marking function could create and hold a temporary list: Press a Hotkey, click an object and see a list with added objects. Load your macro and press Play (and obviously a Stop button). If a particular function can’t be executed on a certain object, it’s simply bypassed. Does that makes sense?