Failed saving image on plugin directory. (solved)
-
Is there a way to save image inside the folder in plugin directory specified in code?
I can save in folder outside plugin directory but not sure what folder dir is compatible with MAC and WIN. Only way is to call File.dirname(FILE)...any ideas?
@@path = File.dirname(__FILE__) # this plugin's folder @@export_files = File.join(@@path, '/ExportFiles/') if params['antialias'].to_s == "true" @anti = true else @anti = false end if params['transparent'].to_s == "true" @trans = true else @trans = false end keys = { ;filename => "#{@@export_files}write_image.#{params['sel_type'].to_s}", ;width => params['getwidth'].to_i, ;height => params['getheight'].to_i, ;antialias => @anti, ;compression => 0.9, ;transparent => @trans } model = Sketchup.active_model view = model.active_view view.write_image keys -
Interesting... When I use UI.savepanel and find that folder on plugin directory I can see the images but with a lock icon on the corner. If I browse that folder normally I don't see anything inside.
-
Hi,
Doing some research I found this post by TIG and it was pretty much what I was looking for.
http://sketchucation.com/forums/viewtopic.php?p=281017#p281017
Thanks!
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