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

 

  

 
SaveTools
The SaveTools event is called when Scorpion saves the toolbox

Example: Saving tool to separate files

def Handle_System_SaveTools(Path):
#
# Path = VT_BSTR
#
# Return 1 if handled by script
# Return 0 if default handling
#
  import os
  Path=Path+'\\tools\\'
  tools=GetToolList()
  f=file(Path+'index.txt','w')
  for i in range (tools.count):
    t=tools.tool(i)
    f.write('"%s","%s"\n' % (t.type,t.name))
    filename=Path+t.name+'.spb'
    if 0: t.save(filename) #set to 0/1 to save tools
  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.