[Cl...] Posted September 17, 2020 Share Posted September 17, 2020 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 More sharing options...
[SH...] Posted September 17, 2020 Share Posted September 17, 2020 My goodness, look like computer programming.. Link to comment Share on other sites More sharing options...
[Ri...] Posted September 17, 2020 Share Posted September 17, 2020 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 More sharing options...
[Ro...] Posted September 17, 2020 Share Posted September 17, 2020 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 More sharing options...
[Se...] Posted September 18, 2020 Share Posted September 18, 2020 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 More sharing options...
[Se...] Posted September 18, 2020 Share Posted September 18, 2020 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" Et voilà ! Link to comment Share on other sites More sharing options...
[Cl...] Posted September 18, 2020 Author Share Posted September 18, 2020 Looks like a very simple solution. Thank you! 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