The EagleCad Tutorial Grid Size Unit Setting will cover how to edit the EagleCad eagle.scr script file. If you use EagleCad and find you want to use Mils or mm, or simple want to change the default grid settings, then this tutorial will show you how. There is also some basic information on this on the EagleCad FAQ’s page located here.
This tutorial will concern itself with the eagle.scr script file, this deals with settings for the layouts, schematics and libraries. There are two other script files called eagle.epf and a user specific eagler.usr, eagle.epf saves all the settings during work and eagle.usr contains user specific and global settings not associated with layouts, schematics and libraries, but things like window settings for example.
Before we go any further I use the mm setting mainly as I deal with metric measurements the majority of the time, I have access to a LPKP milling machine and all the drill bits are metric. It is worth bearing in mind if you intend to send your Gerber files to a PCB fabrication house, ensure you are working within their requirements and tolerances.
The image below shows a screen capture of my EagleCad version 7 installation, the location for the script file can be seen as C:\EAGLE-7.0.0\scr\eagle.scr. The location is the same for version 6 and I believe other versions as well, just the root EagleCad folder maybe different.
The next image shows the Eaglcad eagle.scr file opened in Notepad++, with the grid settings for the SCH (schematic) highlighted on line 16 (click to enlarge). Also note the BRD (board) grid setting on line 10, this uses lines instead of dots.
So what does GRID MM 2.54 DOTS ON ALT MM 0.3175 actually mean, well you have probably guessed most of it already, but I will run through the meaning:
- GRID – Specifies the grid command and the current unit which is MM
- 2.54 – Sets the grid size to 2.54mm
- DOTS – Sets the grid to be displayed as dots, LINES is an alternative option
- ON – Sets the grid on as soon as you enter the schematic mode
- ALT – Defines the alternate grid
- MM – Sets the alternate units in this case to mm
- 0.3175 – Sets the alternate grid size to 0.3175mm
The next image shows the result of this setting after the eagle.scr file were saved and EagleCad restarted and the schematics mode entered.
EagleCad also has a handy help file that gives you all these settings, as well as a few additional ones not mentioned. Simply enter the help mode and search for grid, a screen capture of the help article is posted below.
I take great care when writing all the tutorials and articles, ensuring all the code is fully tested to avoid issues for my readers. All this takes time and a great deal of work, so please support the site by using the Adfly links etc. If you have found this useful or have any problems implementing, please feel free to leave a comment and I will do my best to help.