The ToolApply event is called when the user press Apply on a tool Example:
Saving a tool to a spb file
def Handle_System_ToolApply(Tool):
#
# Tool = VT_BSTR
#
# Return 1 if handled by script
# Return 0 if default handling
#
filename=GetValue('System.Profile')+'\\Tools\\'+Tool+'.spb'
t=GetToolList().get(Tool)
if t<>None:t.save(filename)
return 0
|