Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
π£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
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#moduleIT 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