项目作者: bdrung

项目描述 :
copypaste ULP for EAGLE
高级语言: Makefile
项目地址: git://github.com/bdrung/copypaste.git
创建时间: 2013-11-25T13:37:03Z
项目社区:https://github.com/bdrung/copypaste

开源协议:Other

下载


Description

copypaste allows you to copy a schematic and a corresponding board without
loosing the placement of the elements on the board. You can copy a schematic
and board from a newer version of EAGLE to an older version of EAGLE. The
copy ULP creates one script for the schematic and one for the board that creates
and places all elements of the source. These scripts are stored as
clipboard_schematic.scr and clipboard_board.scr. The paste ULP combines the
clipboard scripts, renames the elements with conflicting names, and stores the
result as paste.scr. The paste script is then executed.

Usage

To copy a schematic and board, open the source schematic or board and run the
copy ULP by either typing run copy or pressing the copy shortcut. Then open
the target schematic or board. You may set a mark in the schematic or board to
use a different paste position than the origin. Then run the paste ULP by either
typing run paste or pressing the paste shortcut.

Shortcuts

Add to the beginning of eagle.scr:

  1. assign c+d 'run copy'
  2. assign c+f 'run paste'
  3. assign a+c 'run copy'
  4. assign a+v 'run paste'

Configuration

You can adjust the behavior of copypaste by editing the variable in the
copypaste_config.ulp file.

Copying between different Eagle versions/installations

The copy ULP creates two clipboard files (clipboard_schematic.scr and
clipboard_board.scr). The paste ULP uses these clipboard files as source. The
clipboard files are stored in the scripts directory of your Eagle installation
by default. The directories of your source and destination will differ if you
try to copy a board and schematic from one Eagle version/installation to
another. You have to configure one common directory for the clipboard files in
all versions/installations by editing the copypaste_config.ulp file. Change the
basedir variable from path_scr[0] to a user writable directory. If you want to
use C:\EagleClipboard as clipboard directory, the line would look like that:

  1. string basedir = "C:\EagleClipboard";

Restrictions

  • schematic and board must be consistent.
  • Errors in ERC can lead to questions on paste.
  • There must be a connection between two symbols if they touch each other.

  • Names must not contain ‘

  • Only up to 999 schematic pages are supported (which is equivalent to the limit
    of Eagle 5.3 Professional).
  • Attributes won’t be copied (ul_part, ul_element).

Bugs

Please report bugs to the author(s) (see AUTHORS file) and provide the smallest
possible test case which triggers your bug.

Notice to programming style / Limits of the User Language

EAGLE’s user language has some limitation.

Arrays are not allowed as parameter

Arrays are not allowed as parameter to functions. What I want to write:

  1. int foo[];
  2. int bar[];
  3. int inc(int *list, int index) {
  4. list[index]++;
  5. }
  6. inc(foo, 42);
  7. inc(bar, 21);

Workaround: One function for each array.

  1. int foo[];
  2. int bar[];
  3. int foo_inc(int index) {
  4. foo[index]++;
  5. }
  6. int bar_inc(int index) {
  7. bar[index]++;
  8. }
  9. foo_inc(42);
  10. bar_inc(21);

No structures

No data structures or objects exist. What I want to write:

  1. typedef struct {
  2. int foo;
  3. int bar;
  4. } example_structure;
  5. example_structure foobar;
  6. foobar.foo = 42;
  7. foobar.bar = foobar.foo / 2;

Workaround: Use a prefix for each element of the structure.

  1. int es_foo;
  2. int es_bar;
  3. es_foo = 42;
  4. es_bar = es_foo / 2;