1. Overview

 

For a while now I have been building up a library of tools and utilities written in ULP for EAGLE. Whilst some of them are very much tailored to my design flow, some of them are more generally applicable so I have decided to start to make some of them available for others to use via a GitLab repository. It'll take a little time to clean up and publish some of them so the currently available selection is quite small. I'll add new stuff and enhance the existing stuff over time though. I'm making these available under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) details of which can be found here: https://creativecommons.org/licenses/by-sa/4.0/

 

Naturally I have put a general disclaimer on these tools:

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 

You can find the GIT repository here: https://gitlab.com/rachaelp/eagle-utils

 

2. The Tools

2.0. Index

 

     2.1. addhole.ulp

     2.2. changeVia.ulp

     2.3. copyStyle.ulp

     2.4. getDatasheet.ulp

     2.5. groupNet.ulp

     2.6. nameNet.ulp

     2.7. netToText.ulp

     2.8. showPart.ulp

     2.9. unlock.ulp

 

2.1. addHole.ulp

2.1.1. Command Summary

 

To install the context menu entries:

 

run addHole --install

 

To report the version of the tool:

 

run addHole --version

 

To report the location of the ULP (useful for debug):

 

run addHole --locate-ulp

 

2.1.2. Usage

 

The utility adds two new context menu entries "Place Hole (Non-PT)..." and "Place Hole (PT)..." when you right click on a circle or arc within the board editor. The general use case is that you would import a DXF from the mechanical design to specify all the mechanical parameters, size, shape, fixed component positions, mounting holes etc. Then you would right click on any holes and choose to insert either a plated or a non-plated hole and it would insert a hole of the correct size based on the size of the circle or arc.

 

addHole1-small.pngaddHole2-small.pngaddHole3-small.png

 

2.1.3. Known limitations

 

NONE.

 

2.2. changeVia.ulp

2.2.1. Command Summary

 

To install the context menu entries:

 

run changeVia --install

 

To report the version of the tool:

 

run changeVia --version

 

To report the location of the ULP (useful for debug):

 

run changeVia --locate-ulp

 

To open the main GUI of the ULP:

 

run changeVia

 

2.2.2. Usage

 

The utility adds a new context menu entry "Change Via..." to allow for the selected via to be changed to match a via style which is selectable from a list of all those already in the design. When launched the current via style for the via is automatically selected. Clicking on alternative existing vias and clicking OK will change the via to match another existing via style. Manually altering the values to define a new style and clicking OK will result in the via being updated to the newly defined style.

 

changeVia4.png

changeVia5.png

changeVia6.png

changeVia7.png

 

Opening the main GUI will present a list of all the different via styles currently available in the design. Select an item from the list and it's parameters can be configured such that the drill size, pad diameter and pad style can be chosen. Clicking OK will update all the vias of that style in the design to the updated style.

 

changeVia1.png

changeVia2.png

changeVia3.png

 

2.2.3. Known limitations

 

  1. The start and finish layers of the via can't be changed. The start and end layers remain unchanged when selecting a pre-defined via style which has different layer specifications.

  2. Whist it will show "auto" in the list of available via styles, to change to auto you need to specify a diameter of 0.

  3. The units it uses are only mils rather than adapting to the currently chosen units.

 

2.3. copyStyle.ulp

2.5.1. Command Summary

 

To install the context menu entries:

 

run copyStyle --install

 

To report the version of the tool:

 

run copyStyle --version

 

To report the location of the ULP (useful for debug):

 

run copyStyle --locate-ulp

 

2.5.2. Usage

 

The utility adds a new context menu entry "Copy Style..." when you right click on a hole, via or wire within the board editor. Selecting this option will copy all the style parameters of the selected object into the current settings so that placing a new object of that type will have the same style as the  selected object.

 

2.5.3. Known limitations

 

1. Currently doesn't copy all the layer diameters and shapes for all configured layers. This utility is currently work in progress and this will be resolved in an upcoming update.

 

2.4. getDatasheet.ulp

2.41. Command Summary

 

To install the context menu entries:

 

run getDatasheet --install

 

To report the version of the tool:

 

run getDatasheet --version

 

To report the location of the ULP (useful for debug):

 

run getDatasheet --locate-ulp

 

2.4.2. Usage

 

The utility adds a new context menu entry "View Datasheet" when you right click on a component within either the schematics or the board editors. In order for the utility to work the component needs to have an attribute called DATASHEET which contains the URL of the datasheet for the part.

 

getDatasheet1-small.pnggetDatasheet2-small.png

 

2.4.3. Known limitations

 

  1. If the DATASHEET attribute does not exist or is empty then the ULP does nothing and ends without any action. A future enhancement will enable the reporting of this to the user.

  2. If the URL specified by DATASHEET is invalid it will currently open the default browser and you will be presented with a 404 error page. A future enhancement will be to test the validity or availability of the supplied URL and only switch to the browser for valid URL's, reporting invalid or unavailable URL's to the user.

  3. Adding the DATASHEET attribute currently requires use of the main attribute editor or the attribute command. A future enhancement will be to allow a datasheet to be added with a specific UI element and the URL will be tested for validity before being written into the DATASHEET attribute.

 

2.5. groupNet.ulp

2.5.1. Command Summary

 

To install the context menu entries:

 

run groupNet --install

 

To report the version of the tool:

 

run groupNet --version

 

To report the location of the ULP (useful for debug):

 

run groupNet --locate-ulp

 

2.5.2. Usage

 

The utility adds a new context menu entry "Group Nets..." when you right click on a component within the board editor. Selecting this option will add all the wire segments of the selected net to a group. Subsequent operations can then be performed upon a group such as issuing a CHANGE command and then right clicking again to get the context menu and choosing Change: Group

 

2.5.3. Known limitations

 

NONE.

 

2.6. nameNet.ulp

2.6.1. Command Summary

 

To install the context menu entries:

 

run nameNet --install

 

To report the version of the tool:

 

run nameNet --version

 

To report the location of the ULP (useful for debug):

 

run nameNet --locate-ulp

 

To completely remove an entire named net from the schematic you can perform the following command:

 

run nameNet --delete [--force] name

 

WARNING: It will prompt you with a confirmation box unless the --force option is supplied in which case it will immediately delete the named net in its entirety from your design.

 

To rename a net from the EAGLE command line:

 

run nameNet oldName newName

 

2.6.2. Usage

 

The utility adds a new context menu entry "Name Nets..." when you right click on a component within the schematic editor. If you select this option then the name of any nets connected to pins of the device (except pins of type PWR and SUP) will be changed to match the pin name of the device.

 

nameNetTest1-small.pngnameNetTest2-small.png

 

2.6.3. Known limitations

 

  1. Devices must have any power pins changed to be of type PWR. This can have negative consequences too due to the automatic net connections that this pin type can cause. Without the PWR pin type the nets connecting to global power rails will be renamed and the connectivity of the power rails on the board will be compromised. A future enhancement is planned with the aim to ensure this doesn't happen by automatically detecting pins which connect to nets which contain a global supply connection and not rename these nets.

  2. There is no current way to add a prefix/postfix to net names which are generated so similar devices may accidentally get connected together. A future enhancement is planned which will use attributes to specify prefix/postfix information so these can be set for each device before all the nets are renamed. There will be a UI element created to assist in this as well as additional checks performed and reports to ensure correct renaming.

  3. There is no current way to limit which pins are used for the renaming of nets. A future enhancement is planned which will use attributes to specify which pins to use. There will be a UI element created to assist in this as well as additional checks performed and reports to ensure correct renaming.

  4. Currently this works from a context menu on the components but not directly on nets. A future enhancement will add a "Name Net..." context menu entry when you right click on a net in the schematic or board. This will allow for the choice of which connected component is used to derive the name and to specify (or override) any prefix/postfix as appropriate. There will be a UI element created to assist in this as well as additional checks performed and reports to ensure correct renaming.

 

2.7. netToText.ulp

2.7.1. Command Summary

 

To install the context menu entries:

 

run netToText --install

 

To report the version of the tool:

 

run netToText --version

 

To report the location of the ULP (useful for debug):

 

run netToText --locate-ulp

 

2.7.2. Usage

 

The utility adds a new context menu entry "Add Net Label..." when you right click on a route, airwire or polygon in the board editor. Selecting this option creates a new text label on the currently selected layer. The layer, text size, alignment etc can all be changed in the usual way before clicking to finalise the placement on the board. This facilitates quickly adding silkscreen legends for labelling up connectors for example.

netToText1-small.pngnetToText2-small.png

 

2.7.3. Known limitations

 

NONE.

 

2.8. showPart.ulp

2.8.1. Command Summary

 

To install the context menu entries:

 

run showPart --install

 

To report the version of the tool:

 

run showPart --version

 

To report the location of the ULP (useful for debug):

 

run showPart --locate-ulp

 

2.8.2. Usage

 

The utility adds a new context menu entry "Show in Board" when you right click on a component within the schematic editor and adds a new context menu entry "Show in Schematic" when you right click on a component within the board editor.

 

showPart1-small.png

showPart2-small.png

 

2.8.3. Known limitations

 

  1. Currently I had to choose between a highlight only and a highlight with a locating box. It currently doesn't offer the choice and does not zoom to the selected so it can be a little hard to navigate around sometimes. A future enhancement will allow configuration of the global behaviour to choose whether or not to have the bounding locating box and also whether or not to zoom to the selected part.

 

2.9. unlock.ulp

2.9.1. Command Summary

 

To report the version of the tool:

 

run unlock --version

 

To report the location of the ULP (useful for debug):

 

run unlock --locate-ulp

 

2.9.2. Usage

 

This utility works the same as the built in LOCK command when locking parts from the command line except it is in reverse. For example:

 

RUN unlock U1 R12 C47

 

2.9.3. Known limitations

 

NONE.

 

3. Summary

 

I hope people find these utilities useful. I'll be updating and adding to these over time and will update the GIT repository as I make changes. I'll try to keep this page up to date as I add or update functionality so you all have easy access to the documentation.

 

Let me know what you think and let me know in the comments below if you think there is anything I could add or improve.