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 |