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