sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    PLUGIN REQUEST: export component thumbnail as image

    Scheduled Pinned Locked Moved Plugins
    2 Posts 2 Posters 2.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pibuz
      last edited by

      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!!!


      rough code.zip

      WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        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...

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement