Shapefile or DXF background "invalid or corrupt" error

  Product(s): WaterCAD, SewerCAD, Hammer, StormCAD, CivilStorm, SewerGEMS, WaterGEMS
  Version(s): V8i, CONNECT Edition
  Area:  Layout and Data Input

Problem

When adding a shapefile as a background, the following error appears:

"The shapefile is invalid or corrupt."

OR

When importing a DXF as a background, the following error appears:

"The CAD is invalid or corrupt"


Problem ID#: 46163
 

Solution

For a Shapefile

First, make sure your shapefile consists of at least three files, with the same base file name, with extensions of .shp, .shx and .dbf. All three must be present in order to open the shapefile.

If this does not help, try opening the file in another program such as ArcGIS to see if it is corrupt. If it is not corrupt, try reinstalling the OpenFlows Product.

For a CAD file (DXF)

Check if the file works in other software.

First, try opening the DXF in a CAD program such as AutoCAD or MicroStation to make sure it is not corrupt. If it is OK, try saving it to an earlier DXF format, such as 2004 or R12. Note that in some cases, the corruption may surface during the process of saving to DXF. So, if the original file is a SWG or DGN, try opening the DXF version of it in AutoCAD or MicroStation as well. If the DXF won't open in AutoCAD, contact Autodesk for help on why the original DWG is not able to successfully export to DXF.

Consider AutoCAD or MicroStation integration instead of Standalone

Another option to consider would be to use the AutoCAD or MicroStation integrated version of the OpenFlows product. For some products, AutoCAD integration is an extra cost - check your licensing. For version compatibility, see this article.


New drawing

Another option is to try copying the drawing into a new drawing and then create the dxf from the new drawing.


Linetype Dependency

If the DXF has a linetype dependency, you may need to remove that first, using these steps:

1) Start autocad
2) Run the "DXFIN" command, and choose the dxf in question
3) At the prompt for the linetype/font, just click Cancel to continue
4) Enter these commands:

Command:
CHANGE
Select objects: all[Enter]
X found
Y were not in current space.

Select objects: [Enter]
Specify change point or [Properties]: pr[Enter]

Enter property to change
[Color/Elev/LAyer/LType/ltScale/LWeight/Thickness/Material/Annotative]:
lt[Enter]

Enter new linetype name <varies>: continuous[Enter]

Enter property to change
[Color/Elev/LAyer/LType/ltScale/LWeight/Thickness/Material/Annotative]:
[Enter]

5) Then, use DXFOUT to re-export it.

See Also

Not all the layers in my dxf file are showing up in modelbuilder and the layers that aren't visible are the ones I need to build my model.

The specified module could not be found (Exception from HRESULT: 0x8007007E)

Recommended
Related