I’m developing an sketchup plugin. Is there any API or function to save thumbnail of the currently selected model like component option?
The Model#save_thumbnail method is used to save a thumbnail image to a file.
The Sketchup#save_thumbnail method is used to generate a thumbnail for any SKP file - not necessarily the loaded model.
In general:
https://ruby.sketchup.com/index.html

when i use save_thumbnail it will save all model in workpace to create thumbnail but i want to save thumbnail only model i selecting.
Then you need to create a component using the selection and use the method that TIG suggested.
Or I’m not sure what the
means?
So, possible that use second of my suggestion in above post.
model = Sketchup.active_model
entities = model.active_entities
selection = model.selection.to_a
group = entities.add_group(selection)
group.definition.save_thumbnail “test_thumb.png”
group.explode
Thanks a lot. I got this.