ULP file that renames all VIAS with name "GND1", "GND2", etc. to "GND"

Status
Not open for further replies.

elektr0

Full Member level 5
Joined
May 2, 2006
Messages
279
Helped
2
Reputation
4
Reaction score
3
Trophy points
1,298
Activity points
3,374
ULP file that renames all VIAS with name "GND1", "GND2", etc. to "GND"

Hello,

i placed about 500 vias and need to "name" them to GND.
Is it really necessary to click at each of it ?

Thx

elektr0
 

Re: EAGLE_NAME

The following ULP file renames all VIAS with name "GND1", "GND2", etc. to "GND"

Just type run rename-via.ulp GND


--------



#usage "replace vias with signal name

"

string newname = strupr(argv[1]);

string cmd = "GRID MM finest;\nDISPLAY NONE 18;\n";
string s;

if (board) board(B) {
B.signals(S) {
if (S.name != newname) {
if (strstr(S.name, newname) == 0) {
S.vias(V) {
sprintf(s, "RIPUP (%.4f %.4f);\n CHANGE DRILL %.4f;\n CHANGE DIAM %.4f;\nVIA '%s' (%.4f %.4f);\n",
u2mm(V.x), u2mm(V.y),
u2mm(V.drill),
u2mm(V.diameter[1]),
newname,
u2mm(V.x), u2mm(V.y)
);
cmd+=s;
}
}
}
}
exit(cmd);
}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…