Are external HTML files and Ruby files into the plug-in allowed?

I am using webdialog write a plugin, for easy to update, I want reference some files such as html files, ruby files and so on, which are located in a serve-side.
Then, users download the plugin once time and will get the latest version every time.


  1. I have been moved the topic to right category

  2. Your profile have some misleading information:

  • extension can not run in any web version of SU (If you are using extensions you should have desktop version of SU)
  • there is no 2020 version of SU web
  • There is no operating system “mos”
  • graphics card can be better described

Would you please so kind to correct it!

… back to your question:
For example The Engineering ToolBox is done by such a way…

At least I guess it is a plugin that uses a js call and eval method to download components…

WebDialog is Deprecated.

Please use HtmlDialog that was introduced in SketchUp 2017.

Personally, as user, I prefer to update it myself.

HtmlDialogs can open server side websites (HTML, JavaScript and CSS files.)

The API does not directly define a mechanism for downloading and updating individual Ruby files on the fly.

But it does have methods to install extension RBZ (zip) pakages for entire extension:

You might be able to use Sketchup::Http::Request class to download the package.
Or one of the Ruby libraries. Like:

Yes, it is a clerical error. HtmlDialog Thank you!

Dan, you are amazing, You’ve brought my understanding of the SketchUp Ruby API one step closer

Once the website being hacked, users’ personal files can be deleted without warning. I’m wondering why that specific extension has not been put down from EWH, since it loads remote code that can be changed without further review by the SketchUp team, while still giving users the false feeling of safety that it initially was reviewed.

Static files, images, unprivileged UI code (HTML/JavaScript running sandboxed in browser dialog) ok, but I’d strongly advice against code that runs privileged (Ruby). Ruby code has unrestricted access to user files (read secrets, send over network, delete files). SketchUp allows its developers to submit extension updates through a save mechanism, make use of it. Also consider that users may want to use your extension while being offline.


+1 to all of this.

Thank you for bringing this to our attention. We’ll be doing a new audit of this extension reviewing what it’s doing.

Any reason you don’t want to rely on the extension update mechanism already in place in SketchUp via Extension Warehouse?

You kown, in CN, many users can not visit server that in foreign countries smoothly…

Gotcha. So if the EW service was more reliable in China you could be using it?

Yes, I think so, because the key is most users in CN do not have the habit to visit a foreign website, because of language and network speed. It’s a similar situation in 3D warehouse.

But I do have another consideration: In case if I release a new version, I can push some message or tirgue something to limit the older version.

1 Like

Good point about the language.

Network speed? Is speed to sites outside of China throttled?

What did you mean by “tirgue”?

sorry, it was trigger
something like alert window or add a mask layer

1 Like

There is UI::Notification. SketchUp uses this UI widget to notify about extension updates available from the Extension Warehouse.

Class: UI::Notification — SketchUp Ruby API Documentation

That being said, for my own extensions I use a toolbar button to indicate new versions:


Notice the little red badge for the right-most button. Clicking that will prompt the user to go to Extension Warehouse or the website to update. It’s simple an unobstrusive.

1 Like