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

    SketchUp SDK Scrambler - Problem with paths?

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 319 Views 2 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.
    • T Offline
      talig
      last edited by

      Hi everyone,
      I've been trying to use the sdk scrambler, but it seems like File.directory(FILE) doesn't work very well in scrambled files (returns "file:///").
      I tried Dir.getwd but that returns the directory the .skp file is in, and not that of the plugin script file...

      It's problematic because this way the icons don't display, and any web dialog that I want to open - I can't 😞

      I didn't see any notes about this phenomenon anywhere, so I'm thinking maybe I'm doing something wrong and no one has seen this problem before...
      Please help,
      Thanks,

      • Tali

      Avatar: all rights reserved to Bryan Eppihimer

      1 Reply Last reply Reply Quote 0
      • scottliningerS Offline
        scottlininger
        last edited by

        Talig,

        Are the files you're trying to load in the Plugins directory someplace? You might try Sketchup.find_support_file, which has worked for me in scrambled rubies before.

        http://code.google.com/apis/sketchup/docs/ourdoc/sketchup.html

        Cheers,

        • Scott Lininger
          SketchUp Software Engineer
          Have you visited the Ruby API Docs?
        1 Reply Last reply Reply Quote 0
        • T Offline
          talig
          last edited by

          Scott,
          I'll give it a try. Yes, they are in a subfolder of the Plugin directory.
          Frankly, even if I can get the plugin directory without hard-coding it, it will do the trick...

          • Tali

          Avatar: all rights reserved to Bryan Eppihimer

          1 Reply Last reply Reply Quote 0
          • T Offline
            talig
            last edited by

            Scott,
            You're a lifesaver! Worked like a charm. Just needed to get the plugins folder. Got it.
            Thanks!

            • Tali

            Avatar: all rights reserved to Bryan Eppihimer

            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