Objects from spreadsheet data
-
Hello!
I'm pretty new to spreadsheets and to SketchUp. Please bear with me.
I'm planning to move. My goal is to measure, weigh and label every box as I fill it, enter each into a spreadsheet, then send that data to SketchUp to create representations on the screen of every box. (The boxes will be green on the screen if they are must-ship and orange if they are expendable.)
I plan to create a footprint in SketchUp of a shipping container, then fit each box onto that footprint -- filling the container virtually -- to determine the most efficient method of packing it.
Also, I'm hoping to keep track of the total weight in real time as each box is placed onto the container's footprint; some of the shipping services I'm considering have total weight restrictions.
(Google Sheets is the spreadsheet program I've been using, though I have a copy of Excel if that might work better.)
Does this project seem doable? I'd appreciate any suggestions.
Thank you!
Ed
-
Hi,
You will need to learn about writing a Ruby plugin for SketchUp; there is no way I can see to do this via the standard GUI. I don't know your programming background or skill level, so I don't know whether that would be a major challenge to you or something you feel you can do.
If you decide to proceed, the only parts that sound at all complicated are optimally placing the boxes into the container (unless you move them by hand) and continuously tracking the weight of the container (that would be easier if you wait until it is loaded and then invoke a Ruby function to calculate it, otherwise you are going to get into Observers, which aren't the simplest aspect of SU). The 'spreadsheet' Gem, which is compatible with SU 2014, makes it easy to read most file formats. Drawing the boxes is quite simple.
Steve
-
It's much easier to cope with import/export of spreadsheet data in CSV [comma or tab separated format text files] - these are easily integrated in Excel outside of SketchUp.
You CAN read/write XLS binary files using Excel and Ruby-side Win .so files - PC only.
BUT it's much more convoluted...
With 'gem' Excel-compatible speadsheet stuff available from v2014, with its Ruby2, it'll be considerably easier...
https://github.com/zdavatz/spreadsheetSo the read/write of data is possible, making a box is straightforward, and placing them manually is easy...
BUT optimizing the arrangements of different sizes in a fixed volume is a complex algorithm... if you crack it please share it...
Advertisement