More Eagle Tools – The normalize-text ULP

 

As you might have guessed from my previous posts about the Eagle interface, I’m not Eagle’s largest fan. There does seem to be a user fanbase that have “drunk the Kool-Aid”, but enough of that for now. The CadSoft people have said that after another version or two, they will finally turn to addressing the interface. In the meantime (which may be a year or longer), you’re on your own with the tool you have (to paraphrase the inimitable Donald Rumsfeld).

Changing the size of text in an entire layer is a tedious task that I do once and a while, and like a lot of things in Eagle, seems entirely too much fuss. Sensing that there may well have been some other irritated users before me, who had solved my text-change problem (actually missing Eagle functionality) in an ULP, I searched for a ULP (user language program) to automate this task.  What I was a found a nine year old ULP named “normalize-text.ulp” by Tennessee Carmel-Veilleux.

Part of the problem of searching through Eagle ULPs for a particular job is that there is no rating system or attempt to curate the ULPs into what people find most useful. There are also no categories into which ULPs are organized, such as  “Text Modification”. Below is a screenshot of a couple random ULPs on the list of user language programs (ULPs) at CadSoft.

 

As you can see there is a “Like” button, and number of downloads, and the authors description to guide you, but no real rating system or “greatest hits”. I guess you could argue that there is some curation in the ULP’s, in that CadSoft includes a set of ULPs with Eagle, but I find the large folder of ULPs (titled “ulp” in the Eagle folder) to be vertigo inducing and without a lot of solutions for the jobs I actually do in Eagle, although I do use a couple of ULPs from the ulp folder.  The ULPs in the ulp folder also doesn’t do a very thorough job of patching the very large holes in the Eagle interface, for example, the useful “align.ulp”, I featured last post, is not included in the Eagle distribution.

OK, so I downloaded the normalize-text.ulp by Tennessee Carmel-Veilleux, and fired it up. It purported to normalize all the text on my “silkscreen layers” to my desired setting. Below was the original dialog box:

 

Not bad at all, as far as it goes. I fired it up and it generated a script of changes it wanted to make.

Not having a lot to go on, I punched “Execute” and … nada. Nothing changed. So I did what any adventurous Eagle user would do (on a junk design) I started cutting and pasting parts of the script. And quickly figured it out that it did indeed work. The “Display None tPlace bPlace;” line seemed to be turning off the tName layers that I was interested in changing, so the script didn’t work. A short patch later and the script was operational. It only seems to affect layers that are visible, which is probably a good thing in my book. Most times you don’t want computers changing things you can’t see in a file, especially if you don’t know exactly what they’re doing.

Anyway, I had a few complaints with the normalize-text ULP, even after I got it working. It wouldn’t save my settings between calls to the ULP, so I had to remember what settings I had used last time (you may feel this is trivial, but in my view, dialog boxes should remain the same between calls to a utility program – check the behavior of Photoshop filters for example).

More importantly, I couldn’t control the layer the program was acting on, so the ULP acted as something of a shotgun, without a clear idea of what it was aiming at, unless you knew what “silkscreen layers” were, or were inclined to dig through the docs and source code (and had the skills to do so).

So with a couple hours work, and a bit of coding I had this:

 

 

The ULP now worked with Eagle 6.5, and had  fine grained control over which layers it covered. It switches units seamlessly and also remembers all of the user parameters between ULP calls. Because it needs to write a scratch file, it will even remember your last-used parameters between Eagle restarts. The original author, Tennessee Carmel-Veilleux has given me his blessing to put a new revision number on the ULP.  I’ll upload the modded ULP to CadSoft, too, but in the meantime, it’s in our “tools” repository as normalize-text2.0.ulp, and you’re welcome to take it for a spin if you use Eagle. Eagle Kool-Aid lovers needn’t bother, because “it’s easy to change text on a layer in only four or five steps” :), as I’ve read several times in Eagle forums.

I’ll repeat the warning about not expecting our Tools folder to look too organized, I keep downloading ULPs to find more useful gems. Incidentally my idea with the tools folder, is that I won’t have to do a lot of digging to change versions of Eagle. I just drag the tools folder into the new version and I’ve got all my  mods and hacks with me.

Paul

 

Back to blog