// // This ULP scans a schematic for components whose values // don't match the device type. // // Errors are displayed in a dialog box. No box means no errors! // // Written by vrs, 3/19/2016. // if (!schematic) { dlgMessageBox("
ERROR: No schematic!

\nThis program can only work in the schematic editor."); exit(1); } string outstr = ""; string tmp; int errors = 0; string value, device, lib; schematic(SC) { SC.parts(P){ value = P.value; device = P.device.name; lib = P.device.library; if (lib == "dec-m") { if (device != value) { sprintf(tmp, "Device %s is an %s with value '%s'\n", P.name, device, value); outstr += tmp; errors++; } } } } if (errors) { dlgMessageBox(outstr); if (errors > 50) { output("ulp.txt", "wt") { printf("%s", outstr); } } exit(1); } exit(0);