Hi,
I didn't saw your answer but I produced this code...
I post it for your information...but I will work on your answer
So, my code, as it is now (please don't blame me using a global variable... π )
` class Class_Run_Animation
def initialize
puts "Start of animation v1"
@p=0
@id=0
end
def nextFrame(view)
if $inteloide_cont==true then
puts "Go to scene #{@p}"
pages = Sketchup.active_model.pages
pages.selected_page = pages[@p]
if @p<pages.size-1 then
@p+=1
@id=UI.start_timer(Sketchup.active_model.options["PageOptions"]["TransitionTime"]+Sketchup.active_model.options["SlideshowOptions"]["SlideTime"], false) { nextFrame(view) }
return true
else
puts "End of loop"
return false
end
else
puts "stop animation"
@id=UI.start_timer(1, false) { nextFrame(view) }
end
end
end
module Inteloide
def self.start_animation()
$inteloide_cont=true
Sketchup.active_model.active_view.animation=Class_Run_Animation.new()
end
def self.stop_animation()
$inteloide_cont=false
Sketchup.active_model.active_view.animation=nil
end
def self.pause_animation()
$inteloide_cont = !($inteloide_cont)
puts $bg_cont
end
end`