-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathgroup-rats.ulp
More file actions
54 lines (47 loc) · 1.4 KB
/
Copy pathgroup-rats.ulp
File metadata and controls
54 lines (47 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#usage "This ULP allows you to select a group of parts in a schematic<p>"
"and then it executest the ratsnest command for all parts selected<p>"
"in the board editor.<p>"
"<author>http://www.bobstarr.net</author>"
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2013, Robert E. Starr (http://www.bobstarr.net)
//
// REVISION HISTORY:
//
// v1.00 - 04/29/2013 (RES) - Initial Release
//
//////////////////////////////////////////////////////////////////////////////
//
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND,
// EXPRESSED OR IMPLIED. IF YOU DON'T LIKE IT, DON'T USE IT!
//
//////////////////////////////////////////////////////////////////////////////
string c, cmd;
int count = 0;
if (schematic) schematic(SCH) {
cmd = "BOARD; RATS ";
SCH.sheets(S) {
S.nets(N)
{
N.segments(SEG)
{
SEG.pinrefs(PR)
{
if (ingroup(PR.instance))
{
sprintf(c, "'%s' ", N.name);
cmd+= c;
++count;
}
break;
}
}
}
}
cmd += ";\n";
//dlgMessageBox(cmd);
if (!count)
dlgMessageBox("No items found in selected group!");
else
exit(cmd);
}