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.
If you want to quickly test out this script, here is a super quick and easy way try it out.
- The first step is to Download The ULP
It doesn’t really matter where it downloads, as long as you know where it is.
- Now launch EAGLE and open any window other than the Control Panel; it can be a schematic, a board, a library, etc.
- Drag and drop the ULP you downloaded onto the window. A dialog similar to the following one should pop up.
Figure 1. Main dialog
- Press enter or return, or click the OK button. A second dialog box should open up warning you about potential download speed issues.
- Again, press enter or return, or click the OK button.
The user can tab through the options to change which button enter/return activates like decent software tends to do.
Figure 2. Download status info
- Wait until the dialog box in Figure 1 goes away and you are done!
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.
Figure 3. Configuration level section of tool
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.
Figure 4. Default SparkFun libraries
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.
Permanence | Caching
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.
Figure 5. Permanence section of tool
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.
Figure 6. Download options section of tool
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.
Figure 7. Directory selection dialog box
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.
Figure 8. New directory dialog box
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.
Figure 9. Example of edited install path
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!