Up | CameraError | ImageComplete | LoadTools | SaveTools | ToolApply | ToolVariantChange | DataInputApply | Query Events | UpdateResultPanel | UpdateIndicatorPanel | ContextChange | Mouse Events | Timer | LogMsg

 

  

 
LoadTools
The LoadTools event is called when Scorpion loads the toolbox

Example: Loading tools from separate files

def Handle_System_LoadTools(Path):
  #
  # Path = VT_BSTR
  #
  # Return 1 if handled by script
  # Return 0 if default handling
  #
  Path=Path+'\\tools\\'
  tools=GetToolList()
  f=file(Path+'index.txt','r')
  for line in f:
    type,name=eval(line)      #get tool type and name
    t=tools.add(type,name,0)  #add tool without notifying SPB
    if t<>None:
      t.load(Path+name+'.spb')
    else:
      print 'ERROR adding tool %s of type %s' % (name,type)
  f.close()
  return 1

 

Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.