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

    Writing out temp files - How to cleanly delete when done?

    Scheduled Pinned Locked Moved Developers' Forum
    23 Posts 6 Posters 3.9k Views 6 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      Currently, on Vista 64 when I create the folder in sketchup ruby, if I try to delete the folder through the windows explorer it tells me the folder is currently being used in another app. And I get an error as well when I try to delete the open folder through another instance of SketchUp. I just don't know how it will react in other windows versions and on a Mac, especially since SU on OS is MDI. It might not be able to differentiate which instance of SU created the folder and which is trying to delete it. But it would be interesting to test.

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        Definitely... inquiring minds wish to know... all platform specific quirks are good knowledge. (I actually just logged on to ask a question about the Mac.)

        So... can a separate Sketchup instance, even be opened on the Mac? Usually MDI apps try to keep the user working with the instance that is already open.. but sometimes a user can force a new instance to be opened.

        (I recently found that this is true of Notepad++, by accident. If the app window is smaller than the screen, and you grab one particular filetab, and drag it out of the app and drop it on the desktop, it opens a new Notepad++ instance, with only that file open. And if you drag a file from an instance that only has that file open, into another instance, and the second instance closes automatically. So i'd be interested to know if Mac Sketchup has this behavior.)

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • AdamBA Offline
          AdamB
          last edited by

          @chris fullmer said:

          Currently, on Vista 64 when I create the folder in sketchup ruby, if I try to delete the folder through the windows explorer it tells me the folder is currently being used in another app. And I get an error as well when I try to delete the open folder through another instance of SketchUp. I just don't know how it will react in other windows versions and on a Mac, especially since SU on OS is MDI. It might not be able to differentiate which instance of SU created the folder and which is trying to delete it. But it would be interesting to test.

          Chris,

          Not being able to delete a folder/file on Windows typically means there is a process somewhere with a 'handle' to the file/folder. Yes, it is pathetic that Windows still cannot handle stuff like this - every other OS can.. but anyway..

          First double check you really are releasing the File Descriptor handle you use in Ruby. If you the file isn't really closed, you won't be able to delete it.

          Adam

          Developer of LightUp Click for website

          1 Reply Last reply Reply Quote 0
          • 1
          • 2
          • 2 / 2
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement