Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1/7
2/20/2014
feature one can define and execute queries related to objects in an existing drawing and then draw
them in a new one. This is usually my go-to step in fixing drawings and sure enough going through
this process reduced the file size tremendously. This allowed me to assist our clients by cleaning one or
two problematic drawings, but did nothing to allow users to help themselves, mostly since this problem
seemed to happening exclusively to our architectural clients who typically dont have a license of either
Civil 3D or Map 3D.
It was through some extended dialog with the client that the next piece of the puzzle fell into place,
namely the indication that when opening one of the affected drawings in an earlier version of AutoCAD
(2010 to be exact), a proxy warning dialog window appeared. When examined, the dialog window
finally gave us the lead we needed.
PROXY WAR
(http://microsolresources.files.wordpress.com/2013/08/proxy-dialog-window2.jpg)Looking at the
sample dialog window to the left you will see a very large number of proxies, approximately two
hundred thousand, which would explain the excessive bloating seen in the file size. The proxy warning
targeted the missing application as AcDgnLS, which exposed that the offending objects likely came
from Microstation (the tell being that Microstation files are designated with a DGN extension). Further
research would later precisely target DGN LineStyles . For an extensive understanding of the
underlying purpose of these proxies, please read Kean Walmsleys Through the Interface post named
Purging unwanted DGN linestyle data from an AutoCAD drawing using .NET (http://through-theinterface.typepad.com/through_the_interface/2012/12/purging-unwanted-dgn-linestyle-data-from-anautocad-drawing-using-net.html) and all its derivative posts located at the end of the article.
While this at least revealed the problem , it still left me with no readily accessible tool to rid the drawing
of these proxies. Opening a case with the Autodesk support team confirmed this fact and at the time
the case was open, the only strategies were the previously mentioned workaround using Civil 3D/Map
3D as well as two other alternatives, the first using DXFOUT/DXFIN and the second utilizing AutoCAD
2010.
http://blog.microsolresources.com/2013/08/23/autocad-large-file-size-problem/
2/7
2/20/2014
THE FIX
Fortunately, as of August 2nd, 2013 the AutoCAD DGN hotfix
(http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=22002791&linkID=9240618) has
come out that specifically addresses this issue. In summary all that is required is replacing a file in the
root of the application folder (AcDgnLS.dbx) and then running AutoCAD and using the NETLOAD
command to load a DLL (DgnLsPurge.dll). Once the DLL is loaded, type in DGNPURGE at the
command line and press RETURN to purge out the objects causing file bloat. As a benchmark, I
performed the purging process on a clients file and it took 2 minutes 10 Seconds to clean. Below is a
typical message that is displayed after the purge is complete (total number of purged objects will vary).
(http://microsolresources.files.wordpress.com/2013/08/dgn-purge.jpg)
In addition, I would suggest running a -PURGE command to purge REGAPPS and ALL as well as
using the AUDIT command. Combined with the DGNPURGE, those actions reduced the sample file
down from 8.8MB to 1.3MB. In another instance with a different clients file, the purging process
reduced a drawing to less than 1% of its original size, from 7.5MB to .062MB.
According to the hotfix, computers patched with the new DBX file will also prevent future occurrences
of the file bloat issue from occurring so its imperative that every user is patched and that any drawings
coming from outside consultants are cleaned up before being inserted into your own projects.
EPILOGUE
If you want to incorporate the NETLOAD of the DGNLSPURGE.DLL command into your start up
lisp routine so it loads on every workstation once youve rolled out the DBX file firm-wide, you can add
the following code to your acad2014.lsp (or acad2013.lsp) as it runs the first time AutoCAD is launched
and will allow you to run the DGNPURGE command without manually loading the DLL first.
(command netload C:\\Program Files\\Autodesk\\AutoCAD 2014\\DgnLsPurge.dll)
Lastly, I have seen some clients run the DGNPURGE command and have error messages appear, such
as the following:
Unable to erase stroke (AcDbZombie Object): eNot Allowed For This Proxy
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly
file:///C:\Program Files\Autodesk\AutoCAD 2013\DgnLsPurge.dll or one of its dependencies.
Operation is not supported
The solution for both these messages was to force load the AcDgnLs.dbx file by adding it to the Startup
Suite. After doing so the DGNPURGE command worked as expected.
EDIT 01 (09/03/13)
http://blog.microsolresources.com/2013/08/23/autocad-large-file-size-problem/
3/7
2/20/2014
EDIT 01 (09/03/13)
As of September 3rd, Autodesk has released an additional Hotfix
(http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=22174522&linkID=9240618) for
AutoCAD 2012 and related vertical products.
EDIT 02 (09/10/13)
If you have followed my suggestion above regarding loading the DgnLsPurge DLL automatically and
would also like to run DGNPURGE on every drawing you open to help automate the cleaning
process, I would suggest adding the following code to the end of your acad*doc.lsp (where the asterisk
pertains to the release year e.g. 2014) as this lisp runs the every time an AutoCAD drawing is opened.
NOTE: This will slow the opening process for affected drawings as it will launch into the purge command
every time it encounters a corrupt drawing (it can take several minutes). Once a drawing is cleaned,
subsequent opens will be as quick as they were before adding the code since the purge process returns 0
linestyles to clean out.
;;;
;;; Run DGNPURGE to clean drawings when opened
;;;
(command DGNPURGE)
FILED UNDER AUTODESK, SOLUTIONS
TAGGED WITH AUTOCAD, AUTODESK,
BLOAT, DGN, FILE, HOTFIX, LARGE, PROBLEM, SIZE
About Steven
Steven Costa has been with Microsol Resources, an Autodesk Platinum Partner, for 6 years and
specializes in all things Civil 3D and provides technical support for the Autodesk Infrastructure Design
Suite family. He specializes in streamlining the collaborative workflow between the Autodesk Building
and Infrastructure family of products with a focus on data exchange between Civil 3D and Revit
Architecture and Structure. He also maintains the Microsol Resources website. In his spare time he
dabbles in front and back end web design, scours Reddit for all the latest stories and news, and loves
giving recommendations on bars and restaurants in New York City.
4/7
2/20/2014
Thank you, thank you, thank you. This worked for our bloated files.
Reply
Rhett says:
November 2, 2013 at 2:51 pm
I am using LT 2014 and have the same problem, so I downloaded the HOTFIX and followed the
instructions to copy the extracted files into the installation folder, but when I tried to run NETLOAD
it tells me this is an unknown command . Is this because my version is only LT and not the full
one? Help please!!
Reply
Steven says:
November 4, 2013 at 9:51 am
Unfortunately, the fix is only for the full versions of AutoCAD. AutoCAD LT has quite a few
differences from the full version, one of them being that it lacks support to load .NET files. If you
only have a handful of drawings to clean, I would recommend downloading a free trial of the
full version of AutoCAD as that gives you 30 days to go through your files and clean them
before you have to purchase the license.
Reply
Rhett says:
November 5, 2013 at 11:37 am
Hi Steven, brilliant suggestion but when I tried to run the file from the NETLOAD
command it spewed the following back to me which I dont understand at all.
Command: NETLOAD
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or
assembly file:///C:\Program Files\Autodesk\AutoCAD 2014\DgnLsPurge.dll or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 080131515)
File name: file:///C:\Program Files\Autodesk\AutoCAD 2014\DgnLsPurge.dll >
System.NotSupportedException: An attempt was made to load an assembly from a network
location which would have caused the assembly to be sandboxed in previous versions of the
.NET Framework. This release of the .NET Framework does not enable CAS policy by
default, so this load may be dangerous. If this load is not intended to sandbox the assembly,
please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?
LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean
forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
http://blog.microsolresources.com/2013/08/23/autocad-large-file-size-problem/
5/7
2/20/2014
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()
Any ideas please, this bloating is driving me nuts!!!
Rhett says:
November 6, 2013 at 11:44 am
Hi Steven, scrap the above I have just tried to open the .dll file via NETLOAD and this
time it has worked. Many thanks for the response and for saving me hours of work!!!
Clay Freels says:
December 4, 2013 at 1:31 pm
Can someone help me out as to why when I paste the (command netload C:\\Program
Files\\Autodesk\\AutoCAD 2013\\DgnLsPurge.dll) line into my ACAD2013.lsp or
ACAD2013DOC.lsp files nothing happens when I reload Autocad? My version is a design suite if
that matters. Ive checked the file path and everything looks fine.
Reply
Steven says:
December 4, 2013 at 1:58 pm
Hi Clay,
The likely problem is that when you cut and paste from the blog post, the quotations are copied
as rich-text rather than simple text. Replace all the quotes with these .
Steven
Reply
Clay Freels says:
December 4, 2013 at 2:33 pm
That was it! Never would have thought of that on my own. Thanks!
Louis Russell says:
December 18, 2013 at 5:42 am
Hi Steven,
Firstly thank you for your article, it has almost entirely solved some sever file size issues we were
experiencing in our office. My drafting team had been struggling with files in excess of 150MBs.
Were still having one issue which was not mentioned in your post I was hoping to get assistance on:
we must bind all external references into a drawing set of approximately 40 .dwgs to be forwarded
over to our Client. After following this Hotfix, all drawing files appear in their folders at reasonable
sizes (1 to 6MBs). However after following the the eTransmit process, and setting it to bind external
references, the files saved off in another folder to issuing to the client appear to have been bloated
again.
Is there any way to prevent the drawings from becoming re-infected through the eTransmit
http://blog.microsolresources.com/2013/08/23/autocad-large-file-size-problem/
6/7
2/20/2014
Is there any way to prevent the drawings from becoming re-infected through the eTransmit
process.
Reply
Shimaa Moustafa says:
January 28, 2014 at 2:59 am
Hi Steven,
first of all thanks a lot for your useful article, but I still have a problem. when I run DGNPURFE it
takes long time ( more than 15 minutes )and the file does not work so it has to be restarted.
is that normal or because i have done something wrong?
Reply
Microsol Resources! says:
January 28, 2014 at 10:00 am
Hi Shimaa,
Its hard to say without looking at the drawing, but I have seen this occur with very
corrupt/large files. How many megabytes is this particular drawing?
Reply
Shimaa Moustafa says:
January 28, 2014 at 10:27 am
Dear Microsol
thanks a lot for your response
its around 25MB and it takes about 20 minutes to be DGNpurged, is it normal or i need to
do extra thing ?
Blog at WordPress.com.
Customized Enterprise Theme.
Follow
Follow microsolresources
Powered by WordPress.com
http://blog.microsolresources.com/2013/08/23/autocad-large-file-size-problem/
7/7