Lỗi Unable to save to drawing as it is being accessed by another session

Issue:

When attempting to save a DWG file from Civil 3D or AutoCAD through Desktop Connector, the file fails to be saved and one of the following warnings is displayed:

Inside Civil 3D or AutoCAD application:

            AutoCAD Message

Unable to save to drawing C:\Users\username\BIM 360\...\Project Files\...\filename.dwg as it is being accessed by another session.
Drawing saved to C:\Users\username\BIM 360\...\Project Files\...\savexxxxxxxx.tmp

Lỗi Unable to save to drawing as it is being accessed by another session

 

AutoCAD Message

Drawing file is write protected.
 

 

In the command line:

_QSAVE Unable to save to drawing \. Drawing saved to \

In Desktop Connector's Pending Actions:

The process cannot access the file 'filename.dwg>' because it is being used by another process.

Environment:

The minimum requirements for this article to be relevant are one of the following software combinations:

  • Civil 3D 2020.2 + AutoCAD 2020.1.2 + Desktop Connector 12.4.0.943 + additional requirements in: How Do I Access Autodesk Collaboration for Civil 3D?.
  • AutoCAD 2020.1.2 + File Locking for Autodesk® BIM 360® + Desktop Connector 12.5.0.999.
  • AutoCAD 2022 + Desktop Connector 14.8.0.1381.

Note: The article is equally relevant for all the updates and major versions released at a later date than the ones mentioned in each combination. However as mentioned in the Solution, it is recommended that the latest updates for the specific version are installed.

Solution:

Make sure these project requirements are met:

  1. There have been many improvements to prevent this behavior in latest updates of the software. Make sure your software is up to date.
  • Find the latest version of Desktop Connector here. 
  • Find instructions about AutoCAD and Civil 3D updates here. 
  1. Unsupported files are not used in the project.

Remove any unsupported file types from the project: File Type Limitations for Collaboration for Civil 3D.

  1. The project meets the best practices for Collaboration for Civil 3D.

If the issue persists:

Navigate to the location of the affected file inside Desktop Connector

  • For Desktop Connector version 14.7.0.1306 and earlier: 
C:\Users\\BIM 360\\\Project Files\...
  • For Desktop Connector version 14.8.0.1381 and later:
C:\Users\\ACCDocs\\\Project Files\...
 
  1. Check if the file is locked by another user:
  • Through the Autodesk Docs Document Management web interface.
  • Through Desktop Connector, accessed by Windows File Explorer. 

If the file is locked, unlock it or ask a project admin to do so. For more details, check the Lock and Unlock Document Files section inside Document Management Help - Work with Documents.
 

  1. Check if a BAK file with the same name as the affected DWG exists, and remove it:

    1. Save the affected DWG to a local directory to keep a backup copy.
    2. Using Windows Explorer, navigate to the location of the file through Desktop Connector.
    3. Delete the BAK file with the same name as the DWG that cannot be saved.
    4. In Civil 3D, save the file again to the same location in Desktop Connector.

Note: Use the MOVEBAK command to define a different location for all BAK files to prevent this issue in the future.

  1. Check if there are Error Files, and remove them:

    1. Close all Civil 3D & AutoCAD sessions.
    2. Put the Desktop Connector in Offline Mode.
    3. Browse to the location of the affected file through Windows Explorer.
    4. Delete any ERR files.
    5. Exit Offline Mode.

      Other alternative solutions:

      • Option 1: Save the file with a different name in the same location inside Desktop Connector

      Use the SAVEAS command to save the affected drawing with a different name into the same location

      Note: This method will generate version 1 in Autodesk Docs for the new drawing. 
       

      • Option 2: Save the file with the same name locally, then override the current version in Desktop Connector

      1. Save the affected DWG to a local directory.
      2. Open Desktop Connector with Windows Explorer and navigate to the location of the file.
      3. Drag and drop the DWG from step 1 to the location in step 2.

      Note: This method will overwrite the existing file and generate a new version.

      Additional requirements to check:

      • Review the list of Known Conflicting Softwares in the following article: Desktop Connector Support .
      • Follow the instructions in this article to add exceptions to the antivirus: "Accessed by another session" message returned when trying to save a drawing with Desktop Connector.

      See Also:

      • Unable to save the latest version of a Civil 3D drawing to Autodesk Docs after upgrading Desktop Connector to version 14.8 or later.
      • Desktop Connector keeps displaying a message stating that there are pending actions.
      • General slow performance when opening and saving Civil 3D drawings through Desktop Connector.
      • Cannot save Civil 3D drawing that contains data shortcut to a file locked by another user in BIM 360.

      Products:

      AutoCAD; Civil 3D; AutoCAD LT; Desktop Connector; BIM Collaborate Products; Docs;

      Versions:

      2020; 2021; 2022; 2023;