1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/eagle-5.7.0/ulp/cmd-rename-in-lbr.ulp

46 lines
965 B
Text
Raw Normal View History

2010-03-30 20:14:34 +02:00
#usage "<b>Rename device/symbol/package in library</b>\n"
"<p>"
"<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
string edit = "";
string toName = edit;
if (library) library(L) {
if (deviceset) deviceset(D) {
edit = D.name;
}
if (symbol) symbol(S) {
edit = S.name;
}
if (package) package(P) {
edit = P.name;
}
int Result = dlgDialog("RENAME") {
dlgStretch(0);
string h;
sprintf(h, "<qt>Rename<p><b>%s</b><p>to :</qt>", edit);
dlgLabel(h);
dlgStretch(0);
toName = edit;
dlgStringEdit(toName);
dlgStretch(0);
dlgHBoxLayout {
dlgStretch(1);
dlgPushButton("+OK") {
dlgAccept();
}
dlgStretch(1);
dlgPushButton("-Cancel") dlgReject();
dlgStretch(0);
};
dlgStretch(1);
};
if (Result == 0) exit (0);
exit("RENAME '" + edit + "' '" + toName +"'" );
}