Using WebDialog to draw a face in sketchup

ruby

#1

Hello:
I am a rookie for Ruby API, HTML and JavaScript. I want to simply use a WebDialog to collect the input data and use these values to draw a face in Sketchup.

I followed an example from “Automatic SketchUp_Creating 3-D Models in Ruby” but cannot draw a face.

Here are the codes:

https://gist.github.com/sam75782008/b3044a3a7ed5396c856ce831d5101493

https://gist.github.com/sam75782008/be81b79eba47d2eb9dabdffbac93ddd9

Thanks for you guys’ advice. Sorry for making you inconvenient. It was really just a typo.
It works now. I am really sorry for wasting you guys’ important time.
Thank you so much.

With appreciation,

Sam


#2

Can you edit your post (gray pencil icon at the bottom) and mark your ruby code as ruby code by enclosing it with triple back ticks ``` ? Without proper markup, the forum guesses it is markdown.


#3

Yes, please format your code so it’s readable…

At first glance it looks like it ought to work…
Run it with the Ruby Console open…
Any errors on clicking the WD’s button ?

Add a line into the start of the call_back block, to at least show you what happens when clicked…

puts args

It that has been received OK, then the error is in the parsing etc…


#4

you have typo’s…

face_wd.add_action_callback(“creat_face”) >> face_wd.add_action_callback(“create_face”)
stript >> strip

john


#5

Hello Aerilius:

Thanks for your time. I really sorry for making you inconvenient.

It works now. I really appreciate that.

With appreciation,

Sam


#6

Hello TIG:

Thank you so much. I really appreciate that.

It was just a typo. It works now.

Thanks for your time.

With appreciation,

Sam


#7

Hello John:

Thanks for your time. I really sorry for wasting your important time.

It works now. I really appreciate that.

With appreciation,

Sam


#8

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.