Sunday, January 16, 2022

Drawing file format compatibility in AutoCAD

How to fix the drawing format compatibility in Autocad step by step instructions.


Issue:

This article describes the compatibility between AutoCAD drawing file formats and AutoCAD versions.

Solution:

Drawing (. dwg) files are the native data files that are created when using AutoCAD-based products. 
  • Each AutoCAD-based product uses by default a specific file format when saving to a file, which is important to know when sharing files.
  • DWG files can be opened using any AutoCAD or AutoCAD product of the same version number or later. 
  • For example, AutoCAD 2017 will not be able to open DWG files from newer versions such as AutoCAD 2020.

The following table outlines the native file format for AutoCAD or AutoCAD products:












Some DWG files cannot be purged with DGNPURGE in Autocad

 Issue:

When using the DGNPURGE command in AutoCAD 2012, 2013, or 2014 (from the DGN Hotfix), the process repeatedly shows the following message and then ends with the notation that zero unreferenced linetypes or zero strokes were purged:
 
Unable to erase stroke (AcDbZombieObject): eNotAllowedForThisProxy

Causes:

Third-party add-ons or plug-ins may conflict with DGNPURGE. It is also possible that your AutoCAD installation is missing some registry keys that allow it to work with the DGN Hotfix files.

Solution:

To resolve the problem with DGNPURGE, try each of the following:
  • Type DEMANDLOAD on the command line in AutoCAD and set the value to zero.

  • Uninstall any third-party add-on or plug-in that you have added to AutoCAD.

  • Use the following steps to add keys to the registry on your system:
  1. Exit AutoCAD.
  2. Create a new text file using Notepad and copy the following into it:

    Registry Editor Version 5.00 Windows
    [HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\ObjectDBX\R19.1\Applications\AcDgnLS]
    "LOADCTRLS"=dword:00000009
    "LOADER"="AcDgnLS.dbx"
    "DESCRIPTION"="DGN Line Style Component"
  3. Save to a location of your choice and close the file.

  4. Rename the file so that it has a .reg extension instead of .txt. Be sure it does not end with .reg.txt after renaming (right-click > properties to see the full file name).

  5. Double-click the .reg file to apply it to the registry. Afterwards, the .reg file can be deleted.

"Drawing file is not valid" when opening a file in AutoCAD

Issue:

When opening a drawing file in AutoCAD (or DWG TrueView), the following error message appears:

AutoCAD Message

Drawing file is not valid.
 
User-added image
 
User-added image

Causes:

This error message usually indicates that the drawing has been damaged beyond use or is corrupt. There could be other environmental factors causing it to fail or to become corrupted, such as:
  • Hardware malfunction.
  • Transmittal issues.
  • Improperly converted files.
  • Files stored in cloud location and full file is not available on the local hard drive.
  • File location.
  • Non-Autodesk (third-party) data. 
  • VPN connection dropped while working in the file.
  • File corruption introduced with specific versions of the Desktop Connector.
  • The DWG is downloaded/Opened from Outlook Express 2007

Solution:

Do one or more of the following:
  • Repair or recover the drawing file. See: Optimizing drawing files in AutoCAD with Purge, Audit & Recover.
  • If the file can be opened anywhere, save it to a previous file format.
  • Open the drawing file directly instead of using the shortcut in the Recent Documents menu.
  • Open files created in non-AutoCAD (third-party) applications in the native product and export to AutoCAD DWG format, if available. 
  • Check the file in a text editor such as Notepad and compare to a known-working drawing. If the first few rows are consistently different in format, this indicates irrevocable corruption, improper conversion, or wrong file type.
  • Find a backup or auto-save copy of the file (see Understanding backup and autosave files in AutoCAD).
  • If you see the error message in conjunction with crashing of AutoCAD products in the Collaboration for Civil 3D workflow, see Desktop Connector shuts down and Civil 3D crashes as a result.

Environmental factors:

  • Test opening the file in a different location, such as the local hard disk, to rule out network or cloud storage issues.
  • Verify that the file storage location is working properly. If cloud storage is where the error comes from, reinstall the cloud drive. Some storage solutions offer on-demand access. Disable this option and/or download local copies of the file(s) and check whether they open correctly.
  • Make sure to be logged in or have the necessary apps installed for the cloud storage (e.g., Dropbox Desktop App).
  • For files received by email, have the sender ZIP the file and resend it.
  • Extract drawing files from a ZIP folder before opening, or copying them out of the ZIP to a new location. 
  • If a USB drive or similar support has been used to transmit the file, check the storage for integrity and obtain a new working copy from the original source.
  • Be sure that the combined length of file path, file name, and filename extension does not exceed 255 characters. See: Maximum Path Length Limitation (Microsoft).
  • Open/download the DWG from a most up to date version of Microsoft Outlook.

DWG files increase in file size and file performance degrades in AutoCAD

 Issue:

Drawing files in AutoCAD end up being much larger than they should, often with no obvious data in them. Other symptoms include:
  • Failure to copy and paste elements.
  • Hanging for a long time when selecting text with the properties palette open.
  • Drawing file takes a long time to open.

Causes:

  • Corrupt data in the drawing.
  • The DWG was created in a non-AutoCAD application.
  • A large amount of AEC objects or metadata in the file. 
  • Data is imported from a DGN file and the original linetypes were not mapped or were incorrectly mapped to AutoCAD linetypes. This produces a huge object database in the drawing that cannot be purged with the standard tools. Furthermore, when copying and pasting an entity from an affected drawing into another, the entire database is copied along with it. The problem spreads to the other file.

Solution:

Try one or more of the following:

File repair and maintenance

Update applications

How to repair corrupt AutoCAD files

 Issue:

How to repair a damaged or corrupted AutoCAD drawing (.dwg) file. A drawing may have one or more of the following symptoms: 

  • Drawing file does not open. 
  • Drawing file opens with errors. 
  • File hangs or crashes AutoCAD. 
  • Slow performance when editing a file. 
  • Error messages appear when working in a file. 
  • Commands do not work or are delayed. 
  • Unexplained increase in file size.  
  • Display or regen problems. 
  • Drawing elements missing or shown incorrectly. 
  • Recovered version of the drawing opens but is blank.

Causes:

  • Third-party software is running within AutoCAD. 
  • Non-Autodesk or non-RealDWG product created or saved the file.
  • AutoCAD terminated while saving a drawing file, such as during a power surge or outage. 
  • Old drawings have been used repeatedly over a long time period. 
  • Network anomalies have occurred (such as transmission errors, file locking, and latent writing of data). 
  • Storage media has degraded (such as bad sectors on a hard drive).
  • System RAM is failing or defective.
  • Operating system issues exist.

Solution:

Follow this troubleshooting guide "How to repair corrupt AutoCAD drawings" .


Work through the following solutions as listed:

How to repair Civil 3D drawing which shows bad behavior

 

Issue:

You would like to know how to clean and repair a Civil 3D drawing file (. dwg), as your drawing has become damaged or corrupt in some way, showing one or more of the following symptoms:
  • File will not open.
  • File hangs or crashes AutoCAD.
  • Slow performance when editing and manipulating the file.
  • Error message when opening or when working in the file.
  • Some commands do not work or have a considerable delay.
  • Unexplained file size increase.
  • Display/regen problems.
  • Drawing elements missing.

Causes:

Corrupted drawing. 

Solution:

  1. Open your drawing and type WBLOCK in command line.
  2. Select Entire drawing and location where you would like this Block to be placed (desktop).
  3. Start a new Civil 3D drawing from acad.dwt or other template (DWT with pre-loaded styles, settings).
  4. In Settings tab, assign coordinate system, units and scale identically as from your original drawing.
  5. * Optional: Run IMPORTSTYLESANDSETTINGS command to import all your styles and settings from your original drawing.
  6. Then INSERT (or CLASSICINSERT) the WBLOCKED file you created in step 2. Check the option to "Explode" upon Insertion.
  7. To get layout tabs you right-click on layout tab in the drawing and used “from Template” option to import DWT or DWG file. Choose your DWG file. This will insert layout tabs into your drawing.
Alternatively, you can use the Design Center to copy the layouts to your new drawing per:  Copy objects and style information between drawings in AutoCAD.
  1. Run AUDIT-PURGEPURGE and save the drawing.
Note: If your drawing contains mostly  Civil 3D data, you may repair/rebuild your drawing per: To Export Drawing Data to LandXML and To Import LandXML Drawing Data.