Hello, I’m developing a plug-in using WebDialog of Sketchup.
Thanks to the help of the community, I entered the Web Dialog with the code below and found a way to use the data entered using JavaScript by importing it into the sketchup.
If you use this, you can export the data you entered in the html called test_html in WebDialog through JavaScript.
What I am curious about is, on the other hand, can I send the data in the sketchup to WebDialog?
For example, in a sketchup, you draw a line, and you send the corresponding x, y, z coordinates, length, etc. to Web Dialog (html)
I’d like to make it possible to modify the data using the imported data.
Is this possible by any chance?
Thank you.
Please use HtmlDialog that was introduced in SketchUp 2017.
The #execute_script method is used to execute a JavaScript string on the html dialog asynchronously. You can use it to send data to the dialog. (BTW similar method exist for WebDialog as well)