Refresh thumbnail not working?

I’m using a script with a loop to refresh the thumbnails for the components library.
This is the code from the Ruby API.

componentdefinition = Sketchup.active_model.definitions[0]

Even when I run the code above, the thumbnail doesn’t change from the selected component definition. Do you also experience this? Or is it my SketchUp installation.

The provided example on ComponentDefinition#refresh_thumbnail-instance_method which you are using, will refresh a thumbnail of the first ComponentDefinition of the DefinitionList.

If you want to refresh all you may need to use e.g.:


That is true.
I use a simular loop as yours for all the component definitions.

The code I mentioned above is from the Ruby API.

My problem is that the .refresh_thumbnail method is not working.

Do you experience the same problem?

No, I don’t

Can you please explain how are you doing it, what you see (or not) and what do you expect to happen.

1 Like


Tells SketchUp to refresh all inspectors such as the Component Browser and the Outliner. This is useful when you need to manually force a refresh after you’ve made a change to the document via Ruby. Generally, SketchUp will keep these in sync for you, but occasionally it does not, such as when model.start_operation has disabled UI updates.