neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

41 lines
1.1 KiB
Plaintext

15 years ago
#usage "place >NAME and >VALUE in Package or Symbol if not placed"
string cmd;
if (symbol) {
int no_Sname = 1;
int no_Svalue = 1;
symbol(S) {
S.texts(T) {
if (T.value == ">NAME" && T.layer == 95) no_Sname = 0;
if (T.value == ">VALUE" && T.layer == 96) no_Svalue = 0;
if (T.value == ">GATE" && T.layer == 95 || T.value == ">PART" && T.layer == 95) {
no_Sname = 0;
no_Svalue = 0;
}
}
}
if (no_Sname && no_Svalue) {
cmd = "GRID MIL;\nCHANGE SIZE 70;\nCHANGE LAYER 95;\nTEXT >NAME (0 100);\n GRID LAST;";
cmd += "GRID MIL;\nCHANGE SIZE 70;\nCHANGE LAYER 96;\nTEXT >VALUE (0 0);\n GRID LAST;";
}
}
if (package) {
int no_Pname = 1;
int no_Pvalue = 1;
package(P) {
P.texts(T) {
if (T.value == ">NAME" && T.layer == 25) no_Pname = 0;
if (T.value == ">VALUE" && T.layer == 27) no_Pvalue = 0;
}
}
if (no_Pname) {
cmd = "GRID MIL;\nCHANGE SIZE 50;\nCHANGE LAYER 25;\nTEXT >NAME (0 100);\n GRID LAST;";
}
if (no_Pvalue) {
cmd += "GRID MIL;\nCHANGE SIZE 50;\nCHANGE LAYER 27;\nTEXT >VALUE (0 0);\n GRID LAST;";
}
}
exit (cmd);