Jump to content

PCM store results


---
 Share

Recommended Posts

Presettings

Part_Type = inquireList("Are you running a Set-up Part or full Production?","Set-up","Production")
selectCase Part_Type
case "Set-up"
setRecordHead("partid","Set-up")
case "Production"
setRecordHead("partid","Production")

endSelect
***************************************************************************************************************
Postsettings

filePath = "T:\DMR\CMM Data\10122X Op-10_Rev_A\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt"

if fileExists(filePath) then // if it can't find the file then it will not error out.

endif

if Part_Type == "Set-up"
copyFile(filePath,"T:\DMR\CMM Data\10122X_Set-up\theresults.txt")

endif
***************************************************************************************************************
When the operator chooses "Set-up" the report goes to the 10122X Set-up folder like it's supposed to.

It also goes to the filePath = "T:\DMR\CMM Data\10122X Op-10_Rev_A\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt". I don't want it to go there.
Link to comment
Share on other sites

Is it because you are using the copyFile function?

You can do this without PCM from the Results to File option.

Either way I believe you will need to add a deleteFile function afterwards to delete the original.

I'm sure Eric has a much simpler approach.
Link to comment
Share on other sites

Put
FileEnd="10122X Op-10_Rev_A\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt"
In the production part of your inquire list

Put
FileEnd="10122X_Set-up\theresults.txt"
In the setup part of your inquire list

FileBase="T:\DMR\CMM Data\"

filePath =FileBase+FileEnd
Link to comment
Share on other sites

You might shorten the first part like this:

Part_Type = inquireList("Are you running a Set-up Part or full Production?","Set-up","Production")
setRecordHead("partid",Part_Type)


No need to use the case function here 😉
Link to comment
Share on other sites

We had the same problem as you. We use that quite easy solution:

First you set the path, depending on the choice of the operator:


selectCase Part_Type
case "Set-up"
Path = "T:\DMR\CMM Data\10122X_Set-up\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt"
case "Production"
Path ="T:\DMR\CMM Data\10122X Op-10_Rev_A\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt"
endSelect

Then you define the path in "Name for output files"


667_f842faaadfd459b4888c7c99995dfde1.jpg

Et voilà !
Link to comment
Share on other sites

 Share

×
×
  • Create New...