To create script I need to add GEM to Sketchup's Ruby
-
I am writing a ruby script that will take an image and create the lines and curves in Sketchup components so that you can start building from there. To do this I need to import a GEM. I have Sketchup 8 and 2013. I can't find a way to import it.
I was able to import the GEM into my MAC OS Ruby. But I can't find a way to upload the GEM file into Sketchup.
-
Look through threads in the Developers' forum.
The PC Ruby version is an old cut-down thing...
Dan Rathbun has done several pages on using extra Ruby functions inside SketchUp's Ruby...
It is not that straightforward...
Use the Search facilities...
http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=25233 -
@tig said:
It is not that straightforward...

And it would be problematic to distribute such an extension.
Best alternative would be to copy the modules you need and wrap it into your own namespace (to avoid collision with other extensions.)
-
Yes
I have also looked at 'packaging' other Ruby methods with mine to give extended functions in distributed scripts [I gave up!].
The real complexity is that as soon as you look to import one new moved over method, then you'll almost certainly find that it includes 'requires' for several other files, these files in turn require other files and so on.
You'll end up with a massive tangle of files/subfolders 'requiring' other files ad nauseam, and one mistype/misplaced line of code breaks everything - makings untangling it all very very hard...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement