Jump to content

Export all the pcm in measurement plan


Recommended Posts

Copy the "pcmFormula.cfpcm" and "pcmPara.cfpcm" files inside your inspection folder and run the following code.

Afterwards see the filese "pcm-Code1.txt" and "pcm-Code2.txt" in your inspection folder.

space= "          " 
pcmFilesList=list("pcmFormula.cfpcm","pcmPara.cfpcm")

for k=1 to pcmFilesList.size

fileOut=directoryPath("actualInspection")  +  "\pcm-Code" + k + ".txt"
   if (fileExists(fileOut)==true)  then
      deleteFile(fileOut)
          endif
pcmFile=directoryPath("actualInspection")  + "\" + getParameterNamed(pcmFilesList,k)
runPCMFile(pcmFile)
// don't rename dataAll! It's defined inside the .cfpcm files
dataAll.first.size
for i=1 to dataAll.size
data=getParameterNamed(dataAll,i)
output=""
for j=1 to dataAll.first.size
selectCase j
case 2 to (dataAll.first.size-1)
    if  getParameterNamed(data,j)<>""
	output = output + space + getParameterNamed(data,j)  + space
     else 
      output = output + space + "-"  + space
	 endif
caseElse
  if  getParameterNamed(data,j)<>""
	output = output + getParameterNamed(data,j) 
     else 
      output = output +  "-"  
	 endif
	
endSelect
next j
addToFile(fileOut,output + cr())
next i
next k

pcmFormula.cfpcm pcmPara.cfpcm

Edited
  • Like! 2
  • 4 weeks later...
×
×
  • Create New...