string partlist[]; int partlistindex; int x; string key; string options; partlistindex = 0; key = ""; string wirestyle; string p = ""; string s = ""; string e = ""; schematic(S) { s = S.name; char c = '/'; int pos = strrchr(s, c); if (pos >= 0) { p = strsub(s, 0, pos + 1); } string fileName = p + "123_schematic.txt"; output(fileName) { // S.libraries(L) // printf("Library: %s\n", L.name); /* goal: part: C1, pin +, partXY 1.5 3.5, pinXY 2.0 3.5 part: C1, pin -, partXY 1.5 3.5, pinXY 1.0 3.5 part: Q1, pin B, partXY 3.5 3.0, pinXY 3.0 3.0 part: Q1, pin C, partXY 3.5 3.0, pinXY 3.2 2.8 part: Q1, pin E, partXY 3.5 3.0, pinXY 3.2 3.2 ... */ // sortiram po C1, C2,JP1 -- po Part ----------- printf("\n \n --------- start ---------\n"); S.libraries(U) U.symbols(M) M.pins(P) S.sheets(SH) SH.parts(PAR) PAR.instances(PARINS) printf("part: %s pin %s '%s' %s@%s ugao %s%5.3f;\n poz komponente(%5.3f %5.3f);\n poz pinova(%d %d);\n", PAR.name, P.name, PARINS.gate.name, PAR.device.name, PAR.device.library, options, PARINS.angle, u2inch(PARINS.x), u2inch(PARINS.y), P.x, P.y); /* this is the best I can do but I don't know which pin belongs po that part !!!!!!!!! how to sort them up? */ printf("\n \n --------- end ---------\n \n"); } }