π‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Using the Cancel btn, to return to previous menu?
-
Here's an example I know works as I have tested it...
require('sketchup.rb') module CANCEL_TEST #Set default settings @height = 9.feet if not @height # floor to floor height @riser = 16 if not @riser # no. risers total def self.run() self.dialog1() end # Dialog box #1 def self.dialog1() prompts = ["Floor/Floor Height ", "No. Risers"] values = [@height, @riser] @results1 = inputbox prompts, values, "Dialog Box #1" if @results1 @height, @riser = @results1 @riserheight=@height/@riser # riser height self.dialog2() else return nil end end # Dialog box #2 def self.dialog2() prompts = ["My RiserHeight ", "--------"] values = [@riserheight, @any_entry] @results2 = inputbox prompts, values, "Dialog Box #2" if @results2 @riserheight, @any_entry = @results2 puts "Got here !" [@height,@riser,@riserheight,@any_entry].each{|e| puts e} else self.dialog1() return nil end end ### unless file_loaded?(__FILE__) UI.menu("Plugins").add_item("Cancel") { CANCEL_TEST.run() } end ### file_loaded(__FILE__) # load"CANCEL_TEST.rb" end#module
IT is now properly structured to loop back into itself is needs be...
-
Thanks TIG:
I would never have been able to figure out the self.run routine on my own!
Advertisement