Newbie (to ruby) question
-
Hello everyone,
As you know, navigating and working with large models can be quite tricky if you don't have a high performance computer.
This is particularly true when adding descriptions (leader text or screen text) to your drawings. Its ever so slow...
I was wondering if it was possible to have a script that would allow text to be taken from, say, an Excel or Numbers document, and then using a Ruby script fed into Sketchup?
If each string was clearly referenced in the spreadsheet document, this would allow for easy editing. Then in sketchup, using the text tool you'd point to the relevant objects and only enter the string number/reference, and you'd run the ruby script which would fetch the relevant entry from the spreadsheet document and automatically update the SU field...
Is this possible or just wishful thinking?
Ronan
-
It's possible.
-
OK, well that's a good start.
I suppose this should be in the Requests section, but would I have to commission someone to do this?
-
Working with Excel from Ruby is a pain, but it certainly can be done. The hangup is that to write a generic script to work with Excel, would be quite difficult. A custom script would work excellent, but a custom script is a lot of work and time for both parties.
I'm assuming working with Numbers would be the same pain, if not more, because Apple Script might have to be involved as well.
The issues with both are you, the user, telling Ruby, where the fields are in the spreadsheet. A user interface could be made to to make the mapping easy, but that's a whole project in and of itself. And, the code would have to be cross platform to be done right, which means dual pathing.
So, a text file would be easiest. A database would be second easiest, but a heck of a lot more work.
-
Hi Todd,
Thanks for your answer.
I'm looking for the path of least resistance, and am not fussed at all about Excel or Numbers...
I suppose this makes it more straightforward...Ronan
-
Reading Excel files could be done by using roo.
azuby
Advertisement