Jump to content

How to choose "All Characteristics"


---
 Share

Recommended Posts

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

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

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

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

`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

  • 2 weeks later...
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

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

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

 Share

×
×
  • Create New...