I've recently been doing alot of VBA and the thought hit me. Below is a sample of the code i use in every program. This just pulls all the measurements Exports them into an excel CSV file in a row and appends so the data for all parts is in a single sheet. Alot of the time i can have up to 50+ assignments especially pulling basics/Bonus from TP. It can be time consuming but worth it once its all set up.
So I want to try and create the below code using a script. I'm going to attempt this myself. If any of you have experience with VB want to attempt it by all means go for it lol.
Im not so concerned about the pathing for where the file is going that will change and its not hard to do. Just the assigning of variables is the long part.
Thoughts??
So I want to try and create the below code using a script. I'm going to attempt this myself. If any of you have experience with VB want to attempt it by all means go for it lol.
Im not so concerned about the pathing for where the file is going that will change and its not hard to do. Just the assigning of variables is the long part.
Thoughts??
Code:
$$ NO, #########################################_Export_To_CSV_################################################ $$ NO, " CSV COPY FOR FCF " GETTEXT(647,1,{FCFLOC1}) - Line 1 Measure GETTEXT(688,1,{FCFLOC1}) - Line 2 Measure GETTEXT(658,1,{FCFLOC1}) - Line 2 Bonus GETTEXT(692,1,{FCFLOC1}) - Summary basic GETTEXT(695,1,{FCFPROF1}) - Profile Max GETTEXT(696,1,{FCFPROF1}) - Profile Min ASSIGN/V1=LOC9.D.MEAS ASSIGN/V2=GETTEXT(688,1,{FCFSTRA1}) ASSIGN/V3=GETTEXT(647,1,{FCFLOC1}) ASSIGN/V4=GETTEXT(688,1,{FCFLOC1}) ASSIGN/V5=GETTEXT(647,1,{FCFLOC3}) ASSIGN/V6=GETTEXT(688,1,{FCFLOC3}) ASSIGN/V7=GETTEXT(647,1,{FCFLOC2}) ASSIGN/V8=GETTEXT(688,1,{FCFLOC2}) ASSIGN/V9=LOC2.R.MEAS ASSIGN/V10=GETTEXT(688,1,{FCFLOC8}) ASSIGN/V11=GETTEXT(647,1,{FCFLOC4}) ASSIGN/V12=GETTEXT(688,1,{FCFLOC4}) ASSIGN/V13=GETTEXT(647,1,{FCFLOC5}) ASSIGN/V14=GETTEXT(688,1,{FCFLOC5}) ASSIGN/V15=GETTEXT(647,1,{FCFLOC9}) ASSIGN/V16=GETTEXT(688,1,{FCFLOC9}) ASSIGN/V17=GETTEXT(647,1,{FCFLOC7}) ASSIGN/V18=GETTEXT(688,1,{FCFLOC7}) ASSIGN/V19=DIST1.M.MEAS ASSIGN/WRITESTRING=DATE+","+TIME+","+MACHINE+","+REPORT3+","+V1+","+V2+","+V3+","+V4+","+V5+","+V6+","+V7+","+V8+","+V9+","+V10+","+V11+","+V12+","+V13+","+V14+","+V15+","+V16+","+V17+","+V18+","+V19+" FPTR =FILE/OPEN,Z:\QUALITY CONTROL\JAKE P\FAI REPORTS\FIRING PIN 9.26.19\BOOK1.CSV,APPEND FILE/WRITELINE,FPTR,WRITESTRING FILE/CLOSE,FPTR,KEEP
Comment