Hello there,
I am writing a program that measures four identical parts at the same time with the functionality of loops. When the program is initiated, the user inputs four unique serial numbers composed of letters and numbers. The program then measures the four pieces and outputs four different files with the name of the unique serial number in the file names. I do not want the user to manually change each file name after the program is finished. The parts have two rows and columns so I have to use two loops to measure all four parts. I am having an issue in figuring out the logic to have the all the unique serial numbers output in the file names. I have looked on the forum for something similar which I have applied to my program, but nothing this specific.
As of right now, the program only outputs one file. Is it possible to have the "To_file" overwrite change to the next directory or variable after every loop?
I am writing a program that measures four identical parts at the same time with the functionality of loops. When the program is initiated, the user inputs four unique serial numbers composed of letters and numbers. The program then measures the four pieces and outputs four different files with the name of the unique serial number in the file names. I do not want the user to manually change each file name after the program is finished. The parts have two rows and columns so I have to use two loops to measure all four parts. I am having an issue in figuring out the logic to have the all the unique serial numbers output in the file names. I have looked on the forum for something similar which I have applied to my program, but nothing this specific.
Code:
C1_NSL =COMMENT/INPUT,NO,FULL SCREEN=NO, 'SERIAL NUMBER' FOR NEAR SIDE LEFT C2_FSL =COMMENT/INPUT,NO,FULL SCREEN=NO, 'SERIAL NUMBER'FOR FAR SIDE LEFT C3_NSR =COMMENT/INPUT,NO,FULL SCREEN=NO, 'SERIAL NUMBER' FOR NEAR SIDE RIGHT C4_FSR =COMMENT/INPUT,NO,FULL SCREEN=NO, 'SERIAL NUMBER' FOR FAR SIDE RIGHT ASSIGN/SN1=C1_NSL.INPUT ASSIGN/SN2=C2_FSL.INPUT ASSIGN/SN3=C3_NSR.INPUT ASSIGN/SN4=C4_FSR.INPUT ASSIGN/PATH1="F:\DOCS\CMM REPORTS TEST\G9944_"+SN1+".RTF" ASSIGN/PATH2="F:\DOCS\CMM REPORTS TEST\G9944_"+SN2+".RTF" ASSIGN/PATH3="F:\DOCS\CMM REPORTS TEST\G9944_"+SN3+".RTF" ASSIGN/PATH4="F:\DOCS\CMM REPORTS TEST\G9944_"+SN4+".RTF" $$ NO, ** ** V1 =LOOP/START,ID=YES,NUMBER=4,START=1,SKIP=, OFFSET:XAXIS=0,YAXIS=3,ZAXIS=0,ANGLE=0 V2 =LOOP/START,ID=YES,NUMBER=4,START=1,SKIP=, OFFSET:XAXIS=5,YAXIS=0,ZAXIS=0,ANGLE=0 ** Measured Features ** PRINT/REPORT,EXEC MODE=END,$ TO_FILE=ON,OVERWRITE=PATH1,AUTO OPEN REPORT=OFF,$ TO_PRINTER=OFF,COPIES=1,$ TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$ REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$ TO_EXCEL_OUTPUT=OFF, PREVIOUS_RUNS=DELETE_INSTANCES $$ NO, ** LOOP/END LOOP/END
Comment