Purging unwanted linetype bloat

We have been recently running across AutoCAD DWG files that contain hundreds of non-purgable linetypes, some with strange names, some that appear to be nested in mysterious blocks, etc. With help from the Autodesk Forums and some independent research, I became pretty sure these were created by importing Microstation DGN files.


Working on one of these drawings, I was able to use SuperPurge to “hard” purge these linetypes, which in turn released the reference on hundreds of anonymous blocks, some dictionary entries, etc. What a mess. Upon further research, I found this (albeit 6 months old) article from Kean Walmsley titled Purging unwanted DGN linestyle data from an AutoCAD drawing using .NET which goes into detail about how and why this mess gets created.

Then as if magic, yesterday Autodesk released a “hotfix tool” of sorts yesterday to specifically clean up this bloat (be sure to read the readme file for installation instructions). I ran this tool on several infected drawings and the mysterious linetypes and other bloat are deleted. It also releases the reference to many anonymous blocks, those can be purged with the built in Purge command.


We hope this gets incorporated into the normal Purge command in a future release. Thanks Autodesk!

EDIT (June 25, 2013): Jimmy over at JTB World has a post on this, and apparently discovered that this tool could lead to data loss under certain circumstances. The download has been removed from the Autodesk website for now. According to comments here and on JTB World, Kean is working on an update and it will be released soon.

EDIT (August 4, 2013):
An updated HotFix was released today.

EDIT (January 9, 2014):
Kean has posted some new code with an explanation.

EDIT (March 28, 2014):
AutoCAD 2015 and AutoCAD LT 2015 both include the ability to purge DGN linetype bloat. It’s now built into the regular Purge command. See this post for more information.


  1. rkmcswain (Post author)

    Kean, is there any harm in using the original tool, assuming I don’t want to preserve anything DGN related? Thanks.

  2. Kean Walmsley

    Hi RK,
    A small speedbump: thanks to Jimmy Bergmark, we’ve identified an issue with the tool. It currently purges strokes that are needed to display compound linestyle components.
    I’ve addressed it from my side: I’ll post the code to my blog, this week, and we’re working on updating the tool. So we’ve unpublished it, for now, pending the work needed to re-release it.

  3. Kean Walmsley

    There’s no harm, as such, if you don’t care about the DGN data: certain linetypes based on DGN linestyles will be broken (i.e. won’t display as intended), though.

  4. rkmcswain (Post author)

    Unfortunately someone here at some point imported a DGN file and the resulting mess has spread to numerous DWG files. We are cleaning them as we go and have no use for any leftover DGN stuff – thanks for the info and reply Kean. Hope you can get this in the core PURGE command for 2015/16….

  5. chris lindner


    Interesting. I assumed that this was just something unique to our office. These linetypes are very “viral-ish”. We were able to track it back to some drawings provided by one of our clients.
    We found that doing a DXFOUT, then opening the DXF will allow these linetypes to be purged. I ended up writing a Autolisp routine that would create a script that created the DXF, opened it, purged it, and resaved it as a DWG.
    We also added (GetFilterTable “LTYPE” “*Tapered Dash*”) to our startup to alert the user if the drawing they were opening was “infected”. (GetFilterTable code source: http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Using-wildcards-in-tblsearch/td-p/882908)


  6. rkmcswain (Post author)

    Good idea regarding the startup function to detect this garbage. I’ll be working on that tomorrow 🙂

  7. Ralph Sanchez

    After a few years off, I decided to start my blog back up again with this very topic as my first post. And wouldn’t you know it, you beat me to it by a couple of weeks. Editor’s note: Here is a link to Ralph’s post on this topic: http://www.texupport.net/2013/07/does-autocad-seem-slower-than-it-used.html

  8. Amyikfdn10

    I agree to the fact that non-purgable file types have always been a headache for all those who deal with line types. I have not dealt with the Linetype manager before and I am glad that I could know about it in detail from this article.

Comments are closed.