Stop the timer in the Ruby Console: UI.stop_timer $t
Note - It's only good for one file at a time and needs improved if loading multiple files is needed. I just wanted something for "right now," and will try to make it better later.
- Code: Select all
def autoreload(name)
pf = Sketchup.find_support_file('plugins')
file = File.join(pf, name)
$t = UI.start_timer(2, true) do
mt = Kernel.test(?M, file)
if mt.to_i > $mt.to_i
puts "Loading: #{File.basename(file)}"
begin
load file
rescue Exception => e
puts e.message
puts e.backtrace
end
$mt = mt
end
end
end

