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

    To create script I need to add GEM to Sketchup's Ruby

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 449 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.
    • M Offline
      mindlessrabble
      last edited by

      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.

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

        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

        1 Reply Last reply Reply Quote 0
        • tt_suT Offline
          tt_su
          last edited by

          @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.)

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

            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...

            TIG

            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