@e- echoff --echon errpau off errbel off errmes off let lent = 21 write 'hello Im the program in the product' --ORD1.prg --program to write a file containing the information necessary --to fully describe the position,size or type & give a unique identification --to holes or features in the form of a list of co ordinates. -- prompt 'Enter desired number of DECIMAL PLACES <3>>' decpl int def 3 write ' **scanning sheet for data sets **' write '' sta nexa blo --finds prim blo at the datum position gripos dat --sets grid 0 0 to position of blo sta open write cofile 'ord.lis' nexa hol loop coord let seq = @vseq$c let hpos = @vdatum$ --sets co-ord's of hol relative to the grid 0 0 let hpos = --trailing zeros included to 3 dec places let endx = --find the space between the vectors let xpos = --extracts the first vector (x) let xpos = --right justify and set to 8 characters let ypos = --extracts the second vector (y) let ypos = --right justify and set to 8 characters nexa tsa --finds the identification text for the hole let num = '@vtex$c' --puts the text into text variable num let num = --left justifies and sets to 4 characters nexa tsb --finds the description text for the hole let des = '@vtex$c' --puts the text into text variable des let ex = (index('@vdes';'~')) --set to the number of charactors in the line if ((ex .gt. 21).and.(lent .le. ex)) then let lent = (ex) endif let des = (left(des;(ex -1))) --left justifies and sets to the length of the longest string so far write cofile <' ';num;' ';xpos;' ';ypos;' ';des> -- write the text line sta @vseq nexa hol --search for the next hol break coord if endloop coord close cofile write ' *** sorting data ***' write '' -- sort the list into order of hole identification code -- -- *********************put your favorite sort routine here******************** -- --here is mine (PERL) IF (OS$TYP .EQ. 'win_nt') !type ord.lis | sort_ord > ord.lis else !cat ord.lis | sort_ord > ord.lis endif sca 1/1 -- write 'temp sheet scale set to 1/1' if (units$ .eq. 'IN ') then met write 'imperial sheet - sheet units set to metric' endif -- gripos atp 0 0 let spa = 7 let nmb = 0 open read list ord.lis write ' Reading listing into symbol' write '' newc set newl sl0 at -300 -300 endl if (lent .gt. 21) then let lene = (((lent - 21)*3.5)+176) else let lene = 176 endif qvar lene loop read read list text if then let len = newl sl5 at -300 -293 dir 0 (lene) dir -90 dir 180 (lene) v1 lin endl at -300 -303 dir 0 (lene) endl newl sl0 at -280 -293 dir -90 endl at -244 -293 dir -90 endl at -208 -293dir -90 endl newt st3 hein 4 jusn 13 'POSn X Y FEATURE DESCRIPTION' at -300 -298 break read else LET NMB = (NMB+1) if then let text = ' ' endif endif newt st1 hein 4 layn 11 jusn 13 '@vtext' las 0 -@vspa newl sl0 las 0 -@vspa/2 dir 0 (lene) endl las -@vlene @vspa/2 ENDL endloop read close list finc at -300 -300 unloac tex.sym at -300 -300 delc scas if (units$ .eq. 'IN ') then imp endif write 'Loading symbol' write '' vnon loa tex.sym prompt 'Probe position' pos3 chr frecp exit errpau on errbel on errmes on quit