These are special Python variables that can be used in specific areas of GainSeeker.
See Python commands for other commands you can use with GainSeeker.
Variable |
Applies to |
Description |
PC Collect inspection |
This variable can be set to one of these values:
You can set this variable in any script in the sub-inspection. Each time a sub-inspection is opened, this variable is reset to False . |
|
Set this variable equal to the final desired value of the custom statistic you are creating or editing. |
||
PC Collect inspection |
The testid variable identifies which test in an inspection triggered the execution of a Python Design.
|
Your sub-inspection contains a Pass/Fail test with TestID of 1 and a Traceability test with TestID of 2.
If the Pass/Fail test fails, you want the inspector to complete the Traceability test.
For the above scenario, you could use the following code in a Formula test (where the FormulaMode property is set to Post):
if inspect.cursubi.passfail(1).value == 1 and inspect.cursubi.trace(2).value == "" :
disp.message("Please complete the required traceability.") #This reminds the operator to complete the traceability.
cancelsubmit = True #This will prevent the operator from submitting the sub-inspection.
else:
cancelsubmit = False #This will allow the operator to submit the sub-inspection.