Missing SHX Files

A very common issue with AutoCAD is the presence of the dialog below. If you receive this dialog, it means you are missing a shape file that is referenced in the drawing. Shape files contain shapes that can be used by themselves, sort of like blocks. Most likely though, they are part of a complex linetype definition.

Missing SHX file

Specify

If you choose “Specify a replacement for each SHX file”, then you will get the file selection dialog shown below so that you can specify the location of the SHX file. If you do not have it, then perhaps you received this drawing from someone else? If so, ask them for the shape file, and then ask them to use eTransmit next time they send you a drawing so this won’t happen. eTransmit packages the drawing file together with all dependent files (such as shape files, images, and External Drawing references)

missingshx2

What if this is an internal drawing that you have been working on for a while? In that case, maybe the shape file was moved from it’s original location, or maybe your support file search path was changed, and it no longer includes the directory where the shape file lives. In any case, AutoCAD cannot find the shape file. Search your machine and/or your network for this file. The actual shape file name is located in the file name portion of the “Select Shape File” dialog.

Ignore

If you choose “Ignore the missing SHX files and continue”, then you can continue working in the drawing. But note that you may be missing some data, and it’s almost certainly components of complex linetypes.

If you want to remove the SHX file references forever, you will need to purge them from the drawing. But first you’ll have to purge whatever is referencing them, again most likely one or more linetypes. Purge all linetypes and then see if the shape file can be purged. If not, keep digging. Set all layers to use the Continuous linetype, and make sure all entities are set to Bylayer linetype. Purge again. This should free up the shape file for purging if it was referenced in a linetype.

If you do not have access to the required SHX file, it probably will not do much good to ask someone for it. Many times we see people in various CAD forums asking for a certain shape file name. The chances of this working are very slim. Let’s say that you are missing a shape file named “pro-lm.shx”, and you do happen to find someone who has the same file, it’s doubtful that it is the exact same file. Anyone can create a shape file and give it this name. Shape files contain shapes referenced by number. If your drawing uses shape #114 defined in “pro-lm.shx”, and you replace it with a file named “pro-lm.shx” that doesn’t include shape #114, you are going to be in the same boat as before. Even worse, the replacement file may contain a shape #114 that isn’t the same as the original.

If that didn’t do it, run QSELECT and see if any SHAPE entities are present in the drawing. If so, you can select and delete them even though they are not visible.

Lastly, try this lisp file. This will search for three things.

  1. Complex linetypes that reference a shape file.
  2. All loaded shape files.
  3. Any inserted shapes.

Still stuck? If you are still stuck after all this, head over to http://www.manusoft.com and take a look at SuperPurge. It has a “hard purge” feature that will purge anything (read the warnings…)

As always, whether you are doing this manually, with the attached lisp, or with a product like SuperPurge, work on a backup of your drawing until you are sure what you are doing. Good luck.

Feel free to let us know if none of these suggestions work. You can even send us a drawing if you wish. I have only tested these suggestions on a limited number of drawings, and I’m sure there are some cases out there that we have not covered.