#usage "Delete devices

\n" "To delete a number of devices, run this ULP and " "edit the commands in the appearing editor window.

" "The remaining DELETE commands are executed after the " "EXECUTE button has been clicked.

" "Author: support@cadsoft.de" 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);