Error: "Data in file (filename).rvt is corrupt and needs to be manually recovered" when opening a file in Revit

(excerpted from Autodesk Knowledgebase)


Issue:

When opening a file in Revit, the following error message is shown:


Revit File Corrupted

Data in file (filename) is corrupt and needs to be manually recovered.



Note: If this error only occurs when the Audit box is checked, a different issue may be occurring (see Cannot open file with audit in Revit).


Other errors that can occur related to corruption:

  • An unknown error occurred while accessing <PATH>\<FILENAME>.rvt
  • The model {Filename}.rvt is missing many elements, and it cannot be opened.
  • Unresolved Pointer References Error
  • Attempted to access <FILENAME>.rvt past its end


Causes:

For information on possible causes of corruption in Revit see Causes data corruption in Revit.


Solution:

Before continuing in this section try to open the model with the Audit function checked - It can be found in the open dialog.


Overview: 

1.Check Hard disk space

2.Check for Corrupt RVT links

3.Recover automatic backup

4.Recover manual backup

5.Other items to check


  1. First check if the hard drive is low on free space. When Revit opens an RVT file, it expands out the data into the user Temp folder (%TEMP%). If Revit is not able to write or read the Temp folder because of low hard disk space, then corruption messages can occur even when the RVT file itself is fine.  
    1. To ensure that this is not happening, free up at least 5 GB of hard disk space (this requirement is documented in the System Requirements for Revit). If working with larger models/projects (over 100MBs), ensure there is even more space available.
      1. To estimate how much space to keep free:
        1. i.Take the total size of the project (main RVT + all linked RVT models).
        2. ii.Multiply by 20.
        3. iii.Add 5 GB.
      2. [Total Size x 20 + 5GBs] (For Collaboration for Revit models multiple by 3, i.e., Total Size x 20 x 3, before adding the 5GBs.)
      3. To ensure there is no bad data in the Temp folder, and possibly free up significant hard disk space, delete all items currently in the Temp folder. To access this, type %tmp% into the Start menu search, into the Run window (WINDOWS-R), or into the location bar of any folder window. Note: If a warning appears about a file/folder being in use, then skip these items as they are in use by a running application/service.
  2. Check for Corrupt RVT links.
    1. When Revit opens a model, it accesses linked Revit models to check for changes that have occurred. If the linked model is corrupt, a corruption message can appear during the open process (even though the model is not itself corrupt). To check for this:  
      1. Non-workshared models: Move/copy the model to location that does not have access to the links (generally moving/copying it to another folder will work, unless the link is in a network location).
      2. Workshared models: Try opening the model with all of the worksets closed. If the model opens without error, start opening the worksets and see if the error returns when accessing a workset containing Revit links.
  3. If the system has at least 5 GB of hard disk space free and the error continues when opening the model with all the worksets closed, recover an automatic backup. Follow the steps in the links below, based on your file type, to recover a backup copy of the file.  
    1. For non-workshared files:
      1. See: Recovering non-workshared files . Note: If the non-workshared file was saved directly to a network location a backup copy of the file will be saved in the journals folder. This could be another location to recover a backup from. 
    2. For workshared files:
      1. File-based worksharing:
        1. Note: Before attempting to recover a backup of a corrupt workshared file, copy the backup folder to a location away from the corrupt RVT file! If this is not done there is a good chance that the recovery process will fail.  See: Saving a Specific Backup Version as a New File. 
        2. Note: If all of the Central Model Backups are corrupt, also check each of the local models, as well as their backups. 
      2. Revit Server Enterprise:
        1. See: Restore a Previous Version of a Server-Based Central Model
      3. Collaboration for Revit:
        1. See: Collaboration for Revit: Downloading previous copies of models
    3. If a good backup file can be recovered/opened go through the following steps to clean up the model/system:
      1. a.In the Open dialog, check the Audit and Detach from Central check box.
      2. b.Go to Manage > Purge Unused.
      3. c.Go to the Application Menu > Save As dialog, and save the file under a new name (in the same location as the original central model).
      4. d.Switch to the desktop and open Windows Explorer (Windows key + E).Type %TEMP% in the address bar.
      5. e.Delete as many files as possible from this folder. Some files may not be able to be deleted if they are in use by other applications.
      6. f.Move the old local files and their backups to the desktop.
      7. g.Open Revit.
      8. h.Open the project file with "Create new local" checked.
  4. If all of the local files are corrupt and all of the automatic backups are corrupt, recover a manual backup.  
    1. The automatic backups will store a set number of backups, and if more saves are made during a single editing session than this number, all of the automatic backups made previous to the editing session will be replaced. If a problem occurs during the editing session and all of the backups are replaced then there will not be an automatic backup available prior to the problem. Making periodic manual backups ensures saving a good copy of the model.
  5. Other items to check:
    1. ·Non-workshared models saved directly to a network path will have a copy saved in the journals folder.
    2. ·Non-workshared models stored on a cloud drive (e.g., A360 Drive, Dropbox, Box) may have separate backups--check the web interface for the cloud service for backup recovery options.