Up | Draw | Overlay | Tool | Toollist | Timer | SPB | Camera | CameraImage | Bitmap | Historylist - ImageBuffer | Clipboard | ScorpionGeometry | Statistics | Curve | States | Logging | Panels | Shared Memory | BarCode Reader | StdCtrls

Release Notes



Use the GetStateList() to get the StateList object in Scorpion. The StateList object may be used to iterate all states or retrieving named states.

Use the GetState(name) to get the State object by name

The StateList object:

Attributes Access Type Description
count R int number of states
passCount R int number of passed states
Methods Returns Description
get(index) State Returns the State object by index (zero indexed)
getState(name) State Returns the State object by state name

The State object:

Attributes Access Type Description
name R string name of state
active R/W bool  
stateText R/W string the localized state text in multi language profiles
description R/W string the state description
staticColor R/W string name of static background color
staticTextColor R/W string name of static text color
singleInstance R/W bool whether the state is a unique state or not
updateCurves R/W bool update curves if state passes
updateLog R/W bool update log if state passes
keepInHistory R/W bool keep images in history if state passes
classification R/W int classification result enum, 1=pass, 2=fail, 3=error, 4=ignore
passed R bool current classification state
color R string the state background color when external color source is used
textColor R string the state text color when external color source is used

Example 1, list all states and their current classification state

def StateReport():
  for i in range(states.count):
    print 'Name: %s - %s Active: %i Passed %i %s/%s' % (state.name,state.stateText,state.active,state.passed,state.color,state.textColor)



Scorpion Vision Version XII : Build 665 - Date: 20170919
Scorpion Vision Software is a registered trademark of Tordivel AS.
Copyright 2000 - 2017 Tordivel AS.