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/del-devices.ulp

45 lines
973 B
Text
Raw Normal View History

2010-03-30 20:14:34 +02:00
#usage "<b>Delete devices</b>\n"
"<p>"
"To delete a number of devices, run this ULP and "
"edit the commands in the appearing editor window."
"<p>"
"The remaining DELETE commands are executed after the "
"EXECUTE button has been clicked."
"<p>"
"<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
if (library) {
string cmd = "", h;
cmd += "set undo_log off;\n";
library(L) {
L.devicesets(D) {
h = "";
sprintf(h,"REMOVE %s.dev;\n",D.name);
cmd += h;
}
}
cmd += "set undo_log on;\n";
// EditBox
int Result = dlgDialog("Edit and Execute") {
dlgTextEdit(cmd);
dlgHBoxLayout {
dlgPushButton("+Execute") dlgAccept();
dlgPushButton("-Cancel") dlgReject();
}
};
if (!Result)
exit(0);
exit(cmd);
}
else {
dlgMessageBox("\n Start this ULP in a Library \n");
exit (0);
}