I’m new to coding in Ruby for sketch up and have a whole number of questions! Still, I used to do some coding before and currently understand most of coding aspects.
- Is it possible to create an interface within SketchUp just using Ruby or do I have to use WebDialog/HtmlDialog? I need to make buttons/tables/ect.
- I tried the following code, but it just created a new WebDialog:
wd = UI::WebDialog.new "Point Checker" wd.show wd.execute_script("alert('Hello from Web Dialog')");
It seens like it didn’t implement wd.execute_script(“alert(‘Hello from Web Dialog’)”);
- It’s really hard to learn about Ruby and Java Script cooperation in detail, as far as I can’t find any simple step by step explanation of that. I’ve found some written tutorials and they worked for me. I could establish this Ruby/Java Script relation, but the code was more complicated and I don’t quite understand, how it really worked. There are some completely different examples and no really good explanation to the code on the Internet. I’m reading Automatic SketchUp. It’s a fantastic book! However, the code shown in the book is a way different from what really worked in my programme! This simple “wd.execute_script(“alert(‘Hello from Web Dialog’)”);” returns nothing. How do you guys learn this stuff? There no video tutorials or books. This Ruby/JS relation to me is like a rare science. There are so many aspects of it, and so few keys to use. Anyway, thank you, all, folks, who promote this knowledge to people!