Hello and Welcome! If you have a technical question please check out our Forums. If you have an order or shipping question please refer to our Customer Support page. Please see all COVID-19 updates here and thank you for your continued support.
SparkFun will be closed on Tuesday, November 3rd because we are out voting! Orders placed after 2 pm MT Monday, November 2nd will ship on Wednesday, November 4th.
A ULP to customize Eagle like the SparkFun engineers
Some people don't like spending the time configuring software and would rather get to work. We've written a drag-and-drop solution to configure Cadsoft's EAGLE to work the way we use it internally.
We provide this functionality with an EAGLE ULP. ULP stands for user language program. It's an interpreted C like language used to write custom features in EAGLE. By default our ULP will download all of our libraries and other useful EAGLE files. It will then configure all of the keyboard short cuts and colors to what we use internally. It will also setup EAGLE to only use our libraries. Don't worry, all of the stock libraries will be left alone. You can still find them in the control panel, but they won't be in the way when it comes time to add parts to designs.
If you want to quickly test out this script, here is a super quick and easy way try it out.
It doesn't really matter where it downloads, as long as you know where it is.
The user can tab through the options to change which button enter/return activates like decent software tends to do.
If something goes wrong, an error message will open in a modal dialog box & you will know.
In the previous section about the ~ three-click install, none of the options were discussed. The defaults are a fairly safe way to test the script. The tool has three main sets of options.
Speaking of options, all the standard ways to run a ULP work; the RUN command, the menu, and the ULP button.
Our tool gives three levels of configuration. One level only downloads the files you desire. One actually configures EAGLE to have the same look, keyboard shortcuts, etc. as we use here at SparkFun. The final and default option does all of the things.
Part of the configuration process sets up EAGLE to only use our libraries. With the exception of the user-submitted library, we have tested and actively use the parts in these libraries. This configuration with a limited number of libraries makes EAGLE run faster when searching through parts.
The majority of the configuration comes from our eagle.scr. It's this script that sets up the keyboard shortcuts, adjusts layer colors, sets the default grid spacing, etc. Our ULP offers the 'Download only' option for those of you who have personal customizations that you don't want messed with, but want an easy way to get our libraries. This tool is aimed more at the beginner, and the settings should be great for them.
The second major option is the write mode. By default, the files that the ULP downloads will disappear when EAGLE is closed. If the checkbox in the following image is selected, then the files that the tool downloads and creates will remain on your drive. This option is more of a personal preference, and was designed to try to provide flexibility for more advanced users.
By default, our configuration tool will download all of the standard EAGLE files; libraries, design rules, user language programs, scripts, and CAM jobs. It will download these files to their default locations. If the user doesn't want to download our CAM jobs, they can simply uncheck the checkbox in the section they don't want downloaded.
The user is free to change the path where the various file types are downloaded. We have provided the change button as a way to allow the user to configure the directory used. Testing indicated that EAGLE will not allow a script to create new directories without user interaction. The directory selection dialog box is able to create new directories. The button to create a new directory ('New Folder') is located in the lower left corner in the following image.
Pressing this button will open yet another modal dialog box as pictured in the next image. It's personal preference, but we don't find it a terrible idea to create a new directory in the default location to contain all of the new files. This may be useful in the future if you plan on removing files added by this script. Apologies for not making this the default due to the way EAGLE handles new directory creation. New directories created by the EAGLE GUI are permanent even if you have that option unchecked. We decided against having the script 'manually' delete them for lower risk of deleting something important.
The following section of a screenshot shows an example of a custom install path for our EAGLE libraries. The downside to custom install paths is that the script doesn't currently store that information. The user will have to reconfigure the paths each time you run the script. The script uses the currently set paths, so even if the user is only doing the configuration, at least the library and script paths need to match the location where the files live.
This ULP can take a long time to run depending on your network connection and other variables. Please check the status in the location shown in figure 10. If there is an error, an error dialog will popup. If the tool windows disappears, it means the tool has finished.
A second exception to the nonpermanent mode is the script itself. When it runs, the first thing it does is check for an update on GitHub. If an update is found, it will be downloaded and run instead of the version that the user ran.
That quick introduction to the tool should cover most of the information one needs to get up and running. This ULP is an alternative to the Using the SparkFun Libraries, and Configuring the UI sections of the How to Install and Setup EAGLE tutorial on our site.
As always, our code is open source. We encourage you to take it and play with it. There is a fair amount of error checking, but we know that it's incomplete. We accept pull requests on improvements.
The code between the header and the first function definition is where we've hard coded all of the files this script uses. If you want to repurpose this script, I'd start there. Happy hacking!