Back to the naming again. Thinking overnight, perhaps Model Scaler is a bit more descriptive and the submenu should be “Model Scale” ?
Actually in SketchUpWorld a tool is something the user interacts with usually using the pointing device and it has it’s own cursor(s).
This would have to be categorized as a couple of utility commands. (Such commands usually do something simple or a small set of tasks and then are done. They rarely change the cursor or affect the active tool.)
I also thought last night a bit about the notification of change of scale.
A messagebox must be dismissed by the user and might be an annoyance.
A notification popup sometimes might not be noticed. (I often find myself ignoring them.)
And then I thought about what happens if the model is saved in 100x and then later opened.
The user would want to know what scale the model was at.
I forgot that there is also something called a view Note. (You may have seen some displayed if you ever chose one of the standard views like, Top, Iso, etc.) It probably would be good to place a view note that said “Scale: 100x”.
Regarding the use of the classes beforementioned, I had given links into the API documentation that has code examples. However, the UI::Notification
class was added for SketchUp 2017. Your version is not clear as your forum profile says “SketchUp Make” but version 2018. This cannot be as 2017 was the last Make edition release. Perhaps it is time to update your forum profile ?
The UI::messagebox
module method has support back to version 6.0 and perhaps earlier. It’s simplest use with an OK button is …
UI.messagebox("The model scale is now 100x.")
Message box windows are modal. On Windows they seize focus and must be dismissed before the application can regain focus. On Mac the idea of modality is a bit different. (I believe the user can refocus the application but the message window will remain on top of all other application windows until dismissed.)
To use a UI::Notification
requires a SketchupExtension
object, which means repackaging the “script” into a formal extension with a registrar file and moving the main code into a extension subfolder. (I’ve done this.)
I’ll repost later today after testing.