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!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Google Example Plugin Box.rb
-
I am using googles box.rb example to generate a floor I have managed to set up the Width and Depth functions properly. however now I want it so they can select a material from a drop down list. either grass or concrete or bark. this is the current code I am using
prompts = [$exStrings.GetString("Garden Width"), $exStrings.GetString("Garden Height")] values = [6.feet, 4.feet] results = inputbox prompts, values, $exStrings.GetString("Your Garden Size and Material") return if not results # This means that the user canceld the operation width, depth = results model = Sketchup.active_model model.start_operation $exStrings.GetString("Create Box") entities = model.active_entities group = entities.add_group entities = group.entities pts = [] pts[0] = [0, 0, 0] pts[1] = [width, 0, 0] pts[2] = [width, depth, 0] pts[3] = [0, depth, 0] base = entities.add_face pts model.commit_operationany ideas on how I can add a materials prompt that will fill this box with a material.
-
I also just found this page that might help. http://code.google.com/apis/sketchup/docs/ourdoc/material.html
Advertisement