Is there a plugin which will give a x100/x0.01 scale button on the toolbar

I don’t know of one but it looks like the kind of thing that a bit of code might do. I guess this is to use the Dave Method quickly?

The Dave Method doesn’t require scaling down.

1 Like

Providing you create a component first, right? In which case, the request must be for something else perhaps.

Creating the component is part of the Dave Method so yes, the request must be for something else.

I currently work at 1:1… But if I do something where I start getting odd geometry (usually curves) I scale up by 100x…

The only way I know how to do this is

  1. CTL+A (Select All)
  2. S (Scale)
  3. Grab corner
  4. Type 100

Done… And when I am finished, I do the same but do 0.01 at step 4.

I just have this vision of a x100 and x0.01 button on the taskbar which could do this instantly…

If it doesn’t exist, I am more than happy to carry on with what I am doing… .But I just wondered if someone had writen a plugin that I had not seen.

Cheers all

Jon

Interesting.

On a point of order I think you must mean x100 and x 0.01.

Yes.
And maybe another step,
step 5. zoom extents
Could this be done? 3d printing is mostly what I use sketchup for these days.
And could it be done in such a way as to be called with shortcut keys?

On a point of order I think you must mean x100 and x 0.01.

Good call… Yes… 0.01 not 0.1. I have editied my posts for clarity, so they are now correct

When you are resizing your whole model you can use the Tape Measure tool.

  1. draw a 1m (or cm or… ) long edge.
  2. measure its length with the tape measure tool
  3. type 100m (or whatever)
  4. click OK to the dialog box that pops up.

When done inside a group or component this procedure resizes only the contents of the object.

When you are resizing your whole model you can use the Tape Measure tool.

draw a 1m (or cm or… ) long edge.
measure its length with the tape measure tool
type 100m (or whatever)
click OK to the dialog box that pops up.

I know that tip and use it often… But this discusion isn’t about resizing. This is about making the object 100x bigger, when working with small curves and angles as Sketchup struggles with minute detail…

So I just go 100x bigger when SU is struggling with certain tasks… And hten 0.01 smaller to get it back to where it was.

Yes.
And maybe another step,
step 5. zoom extents

Yes… Thats a good idea. I didn’t realise, I do that instinctivly already… So it would be this:

CTL+A (Select All)
S (Scale)
Grab corner
Type 100 (or 0.01 if downscaling)
Shift+Z (Zoom)

And rather than a toolbar button, a hotkey option would be nice too…

Yes.

[Jim4366_ModelBalloon.rb | attachment] (removed)

UPDATED: per conversation below

JonWeaver_ModelScaler_v1.0.1.rbz (2.4 KB)

Depending upon what menu you place it under (ie, if you edit the file) will determine where you look in the command list when assigning your keychord shortcuts. (I put the submenu under the “Edit” menu.)

3 Likes

That is awesome… Thanks for that… Is there any way to indicate whether its done the Expand or Reduce? Because it does a “zoom extents” its impossible to see if it worked without doing a measurements.

Does Sketchup suipport any kind of “echo” command where it can flash text up to say what its doing?

I have to ask… What does “BalloonModel” mean? I don’t get the reference but am probably thinking too hard, as its just a name.

How exactly can yoiu assign this a shortcut key?

If you use the tape measure and resize a 1cm line to be 1m it performs the same function as scale x100 without the need to select all. Or the Dave method as described above which is quick and requires no scaling down.

Looks like Dan also came through with an extension option.

1 Like

The API has a messagebox method …

There is also the UI::Notification class which can show a popup panel in the lower right for up to 10 seconds. (The text is too small for my eyes.)

A balloon (noun), to balloon (verb). If you don’t like the submenu name, change it. It’s not that important.

The submodule had to be named something. Again that can also be changed.

Also the top level namespace module name. I thought it was JIm4366 who was asking, but I now see it was yourself who started the thread. Feel free to change the outer module name as well. (It should be a unique identifier, unique to the “owner” or author.)

Any menu item can be assigned a keyboard shortcut.

I will point you toward the SketchUp User Guide rather than explain “how exactly” myself.

@DanRathbun Thanks so much for doing this… Its a really great and useful tool and your post has taught me so much… I didn’t have any idea you could assign ShortCut keys, so thats something I am going to play with.

Final, question if you don’t mind. How exactly would I use the UI::messagebox and UI::Notification classes? What would be an example syntax if I just wanted to display a quick message?

I want to have a play to see if this will help… But looking at the RB “script” I am not certain of the syntax.

Thanks again

Jon

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.

Okay, Jon (& etc.) see updated extension above.

There is one “gotcha”, … and that is if the view note is manually deleted, the scaler may go out of sync.
But as they cannot be locked, I see no workaround.

No words! That is awesome… Its EXACTLY what when I imagined this Plugin… I can’t thankyou enough… I apprecaite your work writing this.

I now have it assigned to ShiftQ and ShiftA, so I can expand and reduce it with ease.

You are a star!!

2 Likes

To return to the original size you should type 0.01.
:-/