sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    File Size Ruby

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    7 Posts 5 Posters 308 Views 5 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.
    • R Offline
      raineysky
      last edited by

      I have made some very big models recently because of adding a lot of detail. It seems Sketchup's Model Infosettings are in bytes and kilobytes which mean very little to me. It would be nice to see the file size in Megabytes with a click without having to call up the online calculator and transfer the numbers.

      Is there a ruby that will do that? I have checked but haven't found it. The reason the files are getting so big is that I am modeling industrial process loops and the equipment that runs it. Thanks

      1 Reply Last reply Reply Quote 0
      • Alan FraserA Offline
        Alan Fraser
        last edited by

        You need a calculator to divide by 1000?

        3D Figures
        Were you required to walk 500 miles? Were you advised to walk 500 more?
        You could be entitled to compensation. Call the Pro Claimers now!

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @alan fraser said:

          You need a calculator to divide by 1000?

          Depends if he means KB (1000) or KiB (1024) - KiB isn't so easy to do in your head.

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

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

            This one-line copy/pasted into the Ruby Console returns that [saved] SKP's size in Megabytes

            ((File.stat(Sketchup.active_model.path).size)/1048576.0).to_s+" Megabytes"
            

            I'll leave it up to you to make the menu item or toolbar button etc...

            TIG

            1 Reply Last reply Reply Quote 0
            • R Offline
              raineysky
              last edited by

              Thanks guys and Thank You TIG for the code. I want to make it visable on my screen so I don't go crazy when adding bolts, etc. that may not be necessary to get the visual point across.

              1 Reply Last reply Reply Quote 0
              • C Offline
                chrisjk
                last edited by

                I am intrigued why you should need a lot of detail in bolts as per your example (threads drive this I guess?) in a big model - can't you separate the necessary detailed models for a particular part of the process and then add other models as needed?

                If it is just for illustrative purposes, these could be combined as required in Layout if you used the Pro version - and your mention of industrial purposes suggests someone might pay for it..

                Chris

                1 Reply Last reply Reply Quote 0
                • R Offline
                  raineysky
                  last edited by

                  Chris,

                  I am splitting the model up into smaller pieces now and it works much better. Still learning. The code TIG gave me works great. 👍

                  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