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 
Draw face from webdialog
- 
 I have HTML code to create a webdialog form. 
 How do I Make a face with these points and Use the pushpull selection and create the group name---when I click the button?require 'Sketchup' def show_dialog dlg = UI;;WebDialog.new("DialogTest", false, "DialogTest", 600, 150, 150, 150, true); html = <<-HTML <form> <body> <div class="style1" style="width; 511px; height; 70px"> <label id="Label1">Name 1          pt1         pt2           pt3            pt4             Thick<br> </label> <input name="Group1" type="text" value="Group1" style="width; 62px" />     <input name="pt1" type="text" class="style2" style="width; 46px" value="(0,0,0)" />  <input name="pt2" type="text" style="width; 54px; height; 22px" value="(0,10,0)" />  <input name="pt3" type="text" style="width; 63px" value="(0,10,10)">  <input name="pt4" type="text" style="width; 58px" value="(0,10,0)">  <select name="pushpull" style="width; 65px"> <option></option> <option selected="">1</option> <option>2</option> <option>3</option> </select>  <input name="OK" type="button" value="button"></div> <p> </p> </body> </form> HTML dlg.set_html html dlg.add_action_callback("ruby_messagebox") {|dialog, params| UI.messagebox("You called ruby_messagebox with; " + params.to_s) } dlg.show end show_dialogThanks 
- 
 add an action to the form 
 <form action="skp:ruby_messagebox@">change button type to "submit" In the callback 
 tokens=params[1..-1].split("&");
 tokens.each{|t|
 var,val = t.split("=");
 case var
 when "pt1" then pt1=Geom::Point3d.new(val)
 .
 .
 end
Advertisement

 
                             
                             
                             
                             
                             
                             
                            