• Login
sketchucation logo sketchucation
  • Login
โš ๏ธ Libfredo 15.4b | Minor release with bugfixes and improvements Update

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 7 Feb 2014, 15:48

    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
    • T Offline
      TIG Moderator
      last edited by 7 Feb 2014, 15:57

      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
      • T Offline
        tt_su
        last edited by 9 Feb 2014, 13:54

        @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
        • T Offline
          TIG Moderator
          last edited by 9 Feb 2014, 14:24

          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
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement