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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement