[Cl...] Posted February 14, 2023 Share Posted February 14, 2023 Rather new to PCM but learning more every day. Is this satisfactory or is there a better way of doing this? I would normally use separate .para files. Seems to make more sense to have everything in one location. ************************************************************************************************************************ LN = getRecordHead("order") clearCAD() dir = getActualInspectionDir() Run=inquireList("Which operation do you wish to run?","Operation-10","Operation-20") setRunID(Run) if Run=="Operation-10","Operation-20" then setRunID(Run) endif selectCase Run case "Operation-10" loadCADFile(dir+"\123456 - Turn-Blank.sab") // Customer Drill 5.0 MM // 123456 Op-10 Datum_A = 7.550 Diameter_15 = 4.975 Diameter_20 = 7.520 Datum_B = 5.000 case "Operation-20" loadCADFile(dir+"\123456 - Grind-OD.sab") // Customer Drill 5.0 MM // 123456 Op-20 Datum_A = 7.475 Diameter_15 = 4.975 Diameter_20 = 7.520 Datum_B = 5.000 endSelect Link to comment Share on other sites More sharing options...
[Ke...] Posted February 14, 2023 Share Posted February 14, 2023 This looks solid to me. The "if Run=="Operation-10","Operation-20" then setRunID(Run) endif" May be redundant as it should be setting the run id in the command above, so I'd say test with and without it to be sure, but can probably remove it. I would also consider setting a caseElse that throws a message to say "hey, somehow you chose something that I wasn't expecting, try again" and then cncbreaks to prevent the cmm trying to run something unexpected. Link to comment Share on other sites More sharing options...
[Cl...] Posted February 14, 2023 Author Share Posted February 14, 2023 Thanks for the input, Kevin. I'll give it a try. 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