Jump to content

Part size on xlsx report


---
 Share

Recommended Posts

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

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

 Share

×
×
  • Create New...