def panelize_array(drl0, drl0xoffset, drl0yoffset, xcopies, ycopies, drlOUT): """makes multiple copies of single pcb, input drl generated by Altium Designer !*!*! READ BEFORE USING: !*!*! !!! NOTE THAT THIS PROGRAM ASSUMES LESS THAN 9 TOOLS PER INPUT BOARD, ALL OF WHICH ARE CIRCULAR DRILL BITS. NO INPUT OR OUTPUT COORDS SHOULD BE NEGATIVE. ALL FILES IN 2.3 FORMAT, NO SUPPRESSION. DOESN'T SUPPORT REPEAT CODES. ADJUST DESIGN SOFTWARE'S DRILL-FILE SETTINGS ACCORDINGLY!!! INPUT: drl0 = input drl file INPUT: drl0xoffset = x shift value for array in mils INPUT: drl0yoffset = y shift value for array in mils INPUT: xcopies = number of x copies INPUT: ycopies = number of y copies OUTPUT: no returned value, but creates new drlOUT .drl file""" f0 = open(drl0,'r') fOUT = open(drlOUT,'w') firsttime = 1 """Eat characters until start of positioning data""" line0 = f0.readline() fOUT.write(line0) while(line0[0] != 'X'): line0 = f0.readline() #get the next line fOUT.write(line0) #transfer to output file while(line0[0] != 'M'): if(line0[0] == 'T'): fOUT.write(line0) line0 = f0.readline() continue print(line0) xcoord = int(line0[1:6]) print('XCOORD: '+str(xcoord)) n = 0 while(n