2 Replies Latest reply on Jun 26, 2017 7:52 AM by Jim Sculley

    How does SW find the user using a file "in use by" when saving?

    Sarah Dwight

      So I don't really know where to best post this question.


      I am saving an assembly drawing and get this message:

      "This document was read-only when opened, and may have been in use by someone else.

      If the file is being used by another user, save will fail.

      If the file is no longer in use and if you save the document with the original name,

      you will overwrite any changes made by the other user."

      So I cancel and check the assembly in which I am working and when I save I find out which read-only part I have open.

      It is a file in our hardware library which is saved on the network.

      So it is not surprising that someone might have it open.

      The surprising thing is, when I select the "click to find" option it tells me that the user using the file is someone who isn't currently in the state.

      We don't have remote access to the network, so you have to be in the building to use it, or so I have been informed.


      Where is SW finding this info? How does it know which user is using the file?

      We don't have a vault or PDM system. (I know, get past it.) There are 4 users, 2 of which sit within earshot of me, the 4th travels.

      Is it possible one of the seats is not registered correctly? How do we know which user name correlates to the seats being used?

      Also neither coworker in the office has this hardware file open. Is there another reason for a read-only file?


      Anyway I don't need to edit the file so I will just check the box that says "Do not save read-only documents."

      I am just curious.

        • Re: How does SW find the user using a file "in use by" when saving?
          Jim Sculley

          There should be a temp file in the same location as the file.  The temp file will be named the same as the file but with a tilde (~) in front.  If you open that file with Notepad or some other text editor, it will contain the user name of the person who has the file open.  More likely, SW crashed and the temp file was left behind and the file isn't actually open.

          • Re: How does SW find the user using a file "in use by" when saving?
            Greg Rupp

            Hi Sara, I'm guessing solidworks is getting this information from the "lock file". In the windows operating system, every time a file is opened, a "lock file" is created. You may have seen these before, they are hidden files that start with ~$. For sample, if you opened up file: part.sldprt, windows would create a hidden file called ~$part.sldprt


            If you open one of these lock files with text editor (notepad or word) you will see that inside the file it has the username of the person who has the file open. This is likely where SW is getting its information.


            If you have a file that is "locked" by another user and you are certain they do not have it open, you can manually delete the lock file and then the file will become available again. Sometimes this is necessary if a program crashes or is forced closed abruptly and the program is not able to free up the file. To view lock files, you will have to turn off the windows folder option "hide protected operating files (recommended)" and turn on "Show hidden files, folders, and drives". then refresh your folder view.


            Hope that helps,