[Cl...] Posted November 30, 2022 Share Posted November 30, 2022 Here is what I have so far. How do I offer the choice of running the full program, without creating a mini plan for it? Thank you in advance. ********************************************************************************************************************************* LN = getRecordHead("order") clearCAD() dir = getActualInspectionDir() Run=inquireList("Which mini-plan do you wish to run?","Plan-1","Plan-2","Plan-3") setRunID(Run) Part_Number = inquireList("Which part number are you inspecting?", "13-00188", "13-00189", "13-00190") selectCase Part_Number case "13-00188" readPCMFile(dir + "\13-00188.PARA") loadCADFile(dir+"\13-00188.sab") case "13-00189" readPCMFile(dir + "\13-00189.PARA") loadCADFile(dir+"\13-00189.sab") case "13-00190" readPCMFile(dir + "\13-00190.PARA") loadCADFile(dir+"\13-00190.sab") endSelect Link to comment Share on other sites More sharing options...
[Ch...] Posted November 30, 2022 Share Posted November 30, 2022 There are a few ways. With PCM, I believe you can addCF (characteristic), however I don't know the concatenated code for 'all characteristics', I'll do some research. If all characteristics are the same for all parts, do you need to specify what to run? Other than I would just use mini-plan either for all characteristics or for each P/N. There are PCM options for mostly everything on the start run screen. I will get back to you if noone else solves it first. Good luck. EDIT : getCFNames() will return a list of all characteristic names. Perhaps somehow write this to a variable? ALLCHAR = getCFNames() AddCF = ALLCHAR ? Link to comment Share on other sites More sharing options...
[Cl...] Posted November 30, 2022 Author Share Posted November 30, 2022 Thanks, Chris. Link to comment Share on other sites More sharing options...
[Cl...] Posted November 30, 2022 Author Share Posted November 30, 2022 Why won't setRunID(Run) work for the program name? I thought that I could just insert the plan name as a choice, but it won't allow me. Link to comment Share on other sites More sharing options...
[Ch...] Posted November 30, 2022 Share Posted November 30, 2022 Hmm, interestingly enough, the code I just posted seemed to work offline if put in the presettings of your plan (and then I chose a 1 characteristic mini plan to run - and it ran the whole program) However I do believe there is a one-liner that may be simpler. I'll dig around a bit further. Link to comment Share on other sites More sharing options...
[Cl...] Posted November 30, 2022 Author Share Posted November 30, 2022 Nope, my fault I missed something. Link to comment Share on other sites More sharing options...
[Cl...] Posted November 30, 2022 Author Share Posted November 30, 2022 I'm taking the easy way and creating a MP called "Full Program". Link to comment Share on other sites More sharing options...
[Mi...] Posted November 30, 2022 Share Posted November 30, 2022 For a while I was using setRunID() with no argument to do this. I honestly forget why I stopped, I think it worked in some versions but not others (I have everything from 4.0 to 2020 I need to make things compatible with). Or maybe it behaved differently with AutoRun vs when being used without. I elected to just make a FullProgram Miniplan, the only annoyance is if I add a feature I have to edit the MiniPlan. For a while I used the "Form from Characteristic Groups" option and that worked well too. But I found it was easier to just Ctrl + A, Form Miniplan and overwrite the FullProgram one when changes were made. Link to comment Share on other sites More sharing options...
[Je...] Posted December 1, 2022 Share Posted December 1, 2022 `setRunID("complete")` is the full plan without mini-plan structuring If you set the mini-plan to a group of characteristics, any time you add a characteristic to that group, it is included in the relevant mini-plan. IE - In your situation, if you put all characteristics in a group, the mini plan applies to all. If you want to remove an item from the mini-plan, rather than edit, all you have to do is drag it out of the group. Link to comment Share on other sites More sharing options...
[Cl...] Posted December 2, 2022 Author Share Posted December 2, 2022 How can I use setRunID(Run) & setRunID(Complete) together? Link to comment Share on other sites More sharing options...
[Mi...] Posted December 2, 2022 Share Posted December 2, 2022 Please sign in to view this quote. I just tried this in Ver. 6.6.28 and it tells me "Characteristic group 'complete' is not defined" Link to comment Share on other sites More sharing options...
[Cl...] Posted December 12, 2022 Author Share Posted December 12, 2022 Similar thing here with Calypso 7.0.02 (Service Pack 1) "Characteristic group is not defined" Link to comment Share on other sites More sharing options...
[To...] Posted December 12, 2022 Share Posted December 12, 2022 Just guessing here. Would setRunID("All Characteristics") work? Link to comment Share on other sites More sharing options...
[Cl...] Posted December 12, 2022 Author Share Posted December 12, 2022 Please sign in to view this quote. Well, let's give it a try. Link to comment Share on other sites More sharing options...
[Cl...] Posted December 12, 2022 Author Share Posted December 12, 2022 This works. Run=inquireList("Which mini-plan do you wish to run?","Plan-1","Plan-2","Plan-3","Complete") setRunID(Run) if Run=="Plan-1","Plan-2","Plan-3" then setRunID(Run) else ("All Characteristics") endif Thanks for the suggestion, Tom! Link to comment Share on other sites More sharing options...
[To...] Posted December 12, 2022 Share Posted December 12, 2022 Please sign in to view this quote. I noticed that whichever item you choose in the run window (All Characteristics, Current Selection or the Mini-Plan), that choice shows up on the PiWeb Report in the field Run. So, I thought maybe that might be a valid name. Link to comment Share on other sites More sharing options...
[Je...] Posted December 12, 2022 Share Posted December 12, 2022 My apologies. I was sure that I've used setRunID("complete") before and I ran a program without a mini-plan and 'message(getRunID())' returns "complete" in 7.2. I didn't test setRunID to verify in this instance however. Apologies. 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