• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

How to export model info as .csv files using ruby console?

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
5 Posts 3 Posters 552 Views 3 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.
  • D Offline
    db11
    last edited by 1 Mar 2015, 18:54

    I want to be able to export (as .csv) simple lists of model info such as styles / scene names etc with a Ruby code snippet.

    I'm sure it must be quite straight forward, but I'm clueless with Ruby. (though I would like to start learning it).

    What I need at the moment is just a code stub that will generate the csv file from one class of model info — right now I need the style names — and I can swap out the different methods for other info once I understand the basics.

    Anyone have a starting point for me?

    Thanks,

    Doug

    1 Reply Last reply Reply Quote 0
    • O Offline
      oceanembers
      last edited by 2 Mar 2015, 01:20

      I can't help you with the code, I don't know Sketchup's API very well at all, but as for a starting point for learning...

      http://learnrubythehardway.org/book/

      I used this to learn the basics of ruby, and I thoroughly reccomend it.

      1 Reply Last reply Reply Quote 0
      • G Offline
        Garry K
        last edited by 2 Mar 2015, 07:01

        This script creates a simple plugin that traverses your model and creates a csv file


        csv from styles

        1 Reply Last reply Reply Quote 0
        • D Offline
          db11
          last edited by 2 Mar 2015, 12:52

          @garry k said:

          This script creates a simple plugin that traverses your model and creates a csv file

          That's great Gary — does exactly what I want. Many thanks,

          Doug

          1 Reply Last reply Reply Quote 0
          • D Offline
            db11
            last edited by 2 Mar 2015, 12:58

            @oceanembers said:

            I can't help you with the code, I don't know Sketchup's API very well at all, but as for a starting point for learning...

            http://learnrubythehardway.org/book/

            I used this to learn the basics of ruby, and I thoroughly reccomend it.

            Starting to learn Ruby is on the to-do list once I'm through my current set of deadlines. Thanks for the link and the recommendation. I'll check it out.

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

            Advertisement