PLUGIN REQUEST: export component thumbnail as image
-
Hi guys,
I hope some of you PRO coders can help me out. I'm thinking about Fredo, given the fact that the request I'd need is somewhat similar to his wonderful FredoPortrait...I have NO coder knowledge, so i really don't know if what I'm requesting is tough or easy to achieve..
BTW, I kind of have the need to quickly export all the selected components' thumbnail as JPEG/PNG images, named after the component instances' names. I have re-elaborated a few code lines I found somewhere here on the forums, but it's only partial: I'd also like to have the possibility to specify what resolution would be the exporting image. Would be cool also (but not needed) to have the possibility to specify the destination folder..
I'm attaching the basic code lines and thumbnail I made.
Thank you in advance!!!
-
It is already in the API... e.g.
Sketchup.active_model.definitions.find_all{|d| !d.group? && !d.image? }.each{|d| d.save_thumbnail("#{d.name}.png") }
This basic code saves the components' SKP files into your default-folder, as set up in SketchUp's Preferences - probably your 'Documents' folder...
Obviously you can expand this basic code quite a lot...
Advertisement