World's Fastest PCB Manufacturing
My Message
Suggestions
Account

Get started now

Log In

or

Sign Up

My ALLPCB

My Orders Shipping Address Balance Account Settings My SNS Profile
0
  • Home
  • Instant Online Quote Alternate Text
    • PCB Instant Quote
    • PCB Assembly Quote
    • SMD-Stencil Quote
  • PCB Assembly
  • PCB Capabilities
  • Feedback
  • Resources
    • Sponsorship
    • PCB Softwares
    • Units Conversion
    • FAQ
  • About Us
    • About Us
    • About Us
    • Why Us
    • Contact Us
    • News
Log In Sign Up
  • Home
  • Instant Online Quote
    • PCB Instant Quote
    • PCB Assembly Quote
    • SMD-Stencil Quote
  • PCB Assembly
  • PCB Capabilities
  • Feedback
  • Resources
    • Sponsorship
    • PCB Softwares
    • Units Conversion
    • FAQ
  • About Us
    • About Us
    • Why Us
    • Contact Us
    • News
service@ALLPCB.com
Thank you very much for your valuable suggestion!
We will solve it as soon as possible!

How to Create Eagle Scripts

2/13/2017 6:48:48 AM

Eagle scripts are text files with eagle commands. You use them for automating tasks such as changing the width of all the traces on a board, changing board size, or drawing a specific pattern.

How does eagle scripts work?

To run an eagle script you simply enter “SCRIPT scriptname” (exchange scriptname with the name of the script you want to run) into the Eagle command line.
To be completely honest, I really don’t use scripts much. But I do think they can be really useful, so I am going to try to use them more in the future..

Where to find information about commands?

In a script you can use all the commands that are available to run from the command line. A list of available commands can be found in “Editor Commands” in Eagle’s Help function from the menu.
If you click on one of the commands you will get detailed information about how to use that command and which parameters it accepts.

An example script

Let’s say that we want to create a script to automatically set the board size to 5cm x 5cm. Some of the cheap prototype manufacturers use this size as a standard, so it is convenient to have a script for this.The board size is determined by the board outline which is set by lines in the “20 Dimension” layer. Since these lines does not have any name, we can’t move them with the MOVE command. Therefore I will create a script that creates a new board outline. The old one must be deleted manually before we run the script.

Set grid

First, I need to ensure that we are using a millimeter grid (to be able to set the outline to 50 mm). We use the “GRID” command for this:GRID MM;

Set layer

Then I will select the correct layer. “20 Dimension” is the layers we want, so we can select it by typing:LAYER 20;

Draw lines

Now, all we have to do is to draw four lines that will make up the board outline.
“WIRE 0” means a wire (or line) with a width of 0. Then we define the start and stop point for the line “(0 0) (0 50)”:
WIRE 0 (0 0) (0 50)
WIRE 0 (0 50) (50 50)
WIRE 0 (50 50) (50 0)
WIRE 0 (50 0) (0 0)
  • 4618
  • 1
  • 24
Post Comment

    szoke.szabolcs

    2/15/2017 6:48:48 AM

    Bookmarked.Really helpful.

    You might like

    christian.holmberg

    • Threads

      2

    • Following

      0

    • Followers

      0

    PCB Prototype

    PCB Instant Quote

    x mm

    Quantity

    Quote Now

    PCB Assembly

    SMT-Stencil

    • 12
    Products & Service
    PCB Capabilities
    Aluminum PCB Service
    PCB Assembly Service
    SMT-Stencil
    Quotation & Feedback
    Online Auto-Quotation
    PCB Assembly Quote
    Quote by Salesperson
    Customer Reviews
    Customer Support
    FAQ
    Community
    Sponsorship
    Referral Program
    About Us
    About Us
    Why Us
    Contact Us
    News
    Resource Details
    PCB Software
    Units Conversion
    service@allpcb.com central_support@allpcb.com
    Follow Us:
    Facebook YouTube Twitter Tumblr YouTube
    Certification: Certification
    Our Preferred Partners: Our Preferred Partners

    Please send Gerbers to service@ALLPCB.com for quotation © Label_AllpcbcomallRightsReserved Privacy PolicySitemap

    Secure Site by GoDaddy.com This site has earned the McAfee SECURE certification.