Purging unwanted linetype bloat

I 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.  

I love the fact that Autodesk released this tool, but I kind of wish it was a standalone .EXE that could operate on multiple drawings. Nevertheless, I 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 (July 30, 2013):
An updated HotFix was released on July 23, 2013, you can find it here: http://usa.autodesk.com/getdoc/id=DL22002791

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.

Comments

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.

Regards,

Kean

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

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.

Kean

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....

Through the Interface

RK,

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)

Thanks,
Chris

Good idea regarding the startup function to detect this garbage. I'll be working on that tomorrow :-)

Thanks!

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.

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.

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal