Files
SyncHome/trunk/ulp/show-group.ulp

40 lines
768 B
Plaintext
Raw Permalink Normal View History

2023-03-09 10:24:21 +00:00
#usage "Show group from schematic/board in board/schematic<p>"
"<author>Author: alf@cadsoft.de</author>"
string Version = "1.0.0"; // 2012-03-28
string Cmd = "SHOW ";
int cnt = 0;
if (schematic) {
if (project.board) project.board(B) {
B.elements(E) {
if (ingroup(E)) {
Cmd += " " + E.name;
cnt++;
}
}
}
}
else if (board) {
if (project.schematic) project.schematic(SCH) {
SCH.parts(P) {
P.instances(I) {
if (ingroup(I)) {
Cmd += " " + P.name;
cnt++;
break;
}
}
}
}
}
else dlgMessageBox("!Start this ULP in a board or schematic.", "OK");
if(!cnt) {
dlgMessageBox("!No group selected.", "OK");
}
exit(Cmd);