[Cl...] Posted February 4, 2020 Share Posted February 4, 2020 I have a family of parts program utilizing PCM to change nominals and models. I figured out how to insert a formula into the compact printout comment field to identify which part has been run. I need to do the same thing on the excel report, but do not know how. Below are my current postsettings; //Dims to Excel filePath = "T:\DMR\CMM Data\Medtronic\Part Flat Profile_.0934 (feature 200)\" ext = ".csv" //N1 = getRecordHead ("Grind Tang_Rev. B 9.22.16_543_.0934") //dirPath = filePath + N1 + (" ") +date()+" "+time()+ ext Lot = getRecordHead("order") partnum=getRecordHead("partnbinc") dirPath=filePath+Lot+("_")+partnum+ext display(dirPath) if fileExists(dirPath) == true deleteFile(dirPath) endif //#1 DIM200_1 = getActual("200 - Profile_1").actual //#2 DIM200_2 = getActual("200 - Profile_2").actual addToFile(dirPath,date()) addToFile(dirPath,time()) addToFile(dirPath,("T:\DMR\CMM Data\Medtronic\Part Flat Profile_.0934 (feature 200)")) addToFile(dirPath,("Lot Number : "),LN) addToFile(dirPath,("200 - Profile_1 : "),DIM200_1) addToFile(dirPath,("200 - Profile_2 : "),DIM200_2) Link to comment Share on other sites More sharing options...
[Ro...] Posted February 4, 2020 Share Posted February 4, 2020 If you're already using if statements or operator inputs for your part numbers, could you just add another variable that will be the part number? part_num = inquireList("Which part number would you like to run?", "8mm", "10mm", "12mm", "14mm", "16mm", "18mm") if itemSelected=="8mm" then readPCMFile(getActualInspectionDir()+"\8mm.para") THISPART="8mm" endif if itemSelected=="10mm" then readPCMFile(getActualInspectionDir()+"\10mm.para") THISPART="10mm" endif Then maybe a line such as partnum=(getRecordHead("partnbinc"))+THISPART Then addToFile(dirPath,partnum) Link to comment Share on other sites More sharing options...
[Cl...] Posted February 4, 2020 Author Share Posted February 4, 2020 I'll give that a try, thanks Roberto! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in