SketchUp SDK Scrambler - Problem with paths?
-
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
-
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,
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
-
Scott,
You're a lifesaver! Worked like a charm. Just needed to get the plugins folder. Got it.
Thanks!- Tali
Advertisement