Anyone bored and looking for a challenge?
I've seen this type of post several times and don't usually have problems reducing file size. However, this one has me stumped.
I received a drawing from another consultant that uses C3D 2013. When I open the drawing in C3D 2012 I get the message that it was created in a newer version of C3D so I assume he did a saveas to 2010.
When I get drawings like this I copy what I need to the clipboard and paste into a new drawing (acad.dwt). This usually works fine. But in this case the drawing is almost 4 MB and contains just one arc. I purged everything I can from the drawing and it is still 3 MB.
I looked for but could not find any of the usual suspects: drawing scales, regapps, empty text objects and wipeouts. When I list "all" there is one arc in model space and 4 viewports in paper space. I did notice that there are hundreds of linetypes and text styles that cannot be purged.
I tried export to AutoCAD DWG 2010, 2007, 2004 and 2000 but that didn't help. Export to AutoCAD DWG R14 and DXF R12 both caused C3D to become unresponsive. Saveas to DWG R14 and DXF R12 caused C3D to become unresponsive.
If anyone can figure out what is making this drawing so large it would be greatly appreciated since the person that sent it to me is on vacation until next week.
Solved! Go to Solution.
Solved by JeffPaulsen. Go to Solution.
Solved by Jeff_M. Go to Solution.
I thought I did post the drawing. I will try again.
Perhaps a proxy object that cannot be displayed for some reason? If you use the quick select tool from the Properties dialog what object types are listed there? I don't see any mention of Auditing, have you tried that yet?
Steve
Please use the Accept as Solution or Kudo buttons when appropriate
An audit returned the following:
Command: audit
Fix any errors detected? [Yes/No] <N>: y
Auditing Header
Auditing Tables
Auditing Entities Pass 1
Pass 1 83800 objects audited
Auditing Entities Pass 2
Pass 2 83800 objects audited
Auditing Blocks
2851 Blocks audited
Total errors found 0 fixed 0
Erased 0 objects
I fixed it but still have no idea how this drawing was created.
As I was typing my description in the first post I realized I hadn't tried any other DXF formats besides R12. I saved as a 2010 DXF. I opened the DXF and was able to purge 2850 blocks, 1218 linetypes, and 130 text styles.
The blocks were all unnamed blocks (name began with an asterisk). Is there a better way to find and/or select unamed blocks? Ssget"x" didn't even find them in the original drawing.
Thanks for the suggestion Steve. But AECTOAcad executes the -EXPORTTOAUTOCAD command in C3D and I already tried that. The problem was a bunch of unnamed blocks I could not list or purge until making a DXF file from the DWG.
It runs the command, but the options are different and it seems to offer more controls. I haven`t really tried it but it may be worth some experimenting.
Steve
Please use the Accept as Solution or Kudo buttons when appropriate
I did try it. I am not sure if it gives more options but it definitely provides more control to the user.
I need help purging these unnamed blocks without creating a DXF file. As it turns out we must have inserted these "infected" drawings into our design drawings prior to today. I have about 10 drawings that contain all sorts of C3D objects that I need to save but would like to erase these unnamed blocks and purge the linetypes and styles.
How can I erase the unnamed blocks in the drawing I posted above without creating a DXF file?
Here's a small lisp that removes all anonymous blocks, USE WITH CAUTION! Hatches, Dimensions, Dynamic Blocks, all may be affected by this. It takes the subject drawing down to just 2 blocks...Paperspace & Modelspace.
(defun c:purgeanonblocks (/ blks) (setq blks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)) ) ) (vlax-for blk blks (vl-catch-all-apply '(lambda (x) (if (wcmatch (vla-get-name x) "`**");;use "`*A*" for anonymous Groups only (vla-delete x) ) ) (list blk) ) ) (princ (strcat (itoa (vla-get-count blks)) " blocks remain in the drawing" ) ) (princ) )
While the lisp in my last post removes the 2800+ anonymous blocks, it only drops the file size by ~1mb. Further investigation finds that there are 33097 items listed in the "ACAD_DGNLINESTYLECOMP" Dictionary. Deleting this dictionary drops the files size down to 450kb.
This lisp will remove that Dictionary.
(defun c:deldgnltstyle ( / dicts dict) (setq dicts (vlax-get (vla-get-activedocument (vlax-get-acad-object)) 'dictionaries ) ) (setq dict (vlax-invoke dicts 'item "ACAD_DGNLINESTYLECOMP")) (princ (strcat "\nDGN Linetypes before: " (itoa (vla-get-count dict)) ) ) (vla-delete dict) (princ "\nACAD_DGNLINESTYLECOMP Dictionary removed!") (princ) )
Another command you might try for the extra linetypes and text styles is LAYTRANS. Select the drawing you are having problems with as the base file, click 'map same', then translate. Run a PURGE after that and you should be able to get rid of the extra line type and text styles.
Was this file native to Civil or did it start out in another software?
Symptoms sound like it came from another software.
The purgedgn has worked for me.
Scott
@JeffPaulsen wrote:Anyone bored and looking for a challenge?
I've seen this type of post several times and don't usually have problems reducing file size. However, this one has me stumped.
I received a drawing from another consultant that uses C3D 2013. When I open the drawing in C3D 2012 I get the message that it was created in a newer version of C3D so I assume he did a saveas to 2010.
Going back to the original post, I suspect the issue is versioning. You assumed he backsaved to 2010. This might not be the case, and C3D is not backwards compatible. There are probably 2013 objects you cannot see.
You're a life saver Jeff. Thank you.
As it turns out if I delete the "ACAD_DGNLINESTYLECOMP" Dictionary using your lisp routine above, it exposes the anonymous blocks to the AutoCAD purge command. I am in the process of running the lisp routine and purging all of the drawings in the project.
I beleive this has something to do with the DGN hotfix refered to by smizsak.
I will contact the author of the drawing next week when he returns from vacation and try to determine how he created the drawing. I will post any updates here.
Update (sort of):
I talked with the author of the drawing and he had no idea what he did to create this issue.
Not sure if anyone is still following this thread, but I have a very similar problem that has me stumped. I received a file from a client that pegs out my memory and locks up my machine regularly. At 9MB the file size itself doesn't seem unreasonable large to me for C3D surface/corridor work.
I've applied the recent hotfix for former dgn files, which I'm pretty sure it was at some point. That helped considerably, but hasn't solved the problem. I've also tried the usual audit, purge, got rid of regapps and scales, and deleted as much as possible that I don't need.
Export to other formats locks it up. I tried the lisp above to delete the dgn dictionary, but get a 'Key not found' error.
I'd like to attach the dwg but apparently it's too large. If there's another way I can upload it let me know. Here's a link instead:
I'm using Adobe Send & Track.
You can view "Ph 2 Corridor.dwg" at: https://files.acrobat.com/a/preview/0d43966f-b0c9-44a9-a45d-eb65a3833696
If anyone has time to take a look I'd appreciate it.
I'm running Civil 3D 2016 with an
Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
RAM 16.0 GB; 64-bit
No wonder your having problems with that file. Your not using any data references or xrefs whatsoever. You have everything in one drawing file.
You should be using data references and xrefs.
For instance:
You should have a drawing with your EG Surface in it only. this could be created from your point data or you could XML the surface you current working file then import it into a fresh drawing and save it as a data reference (you would then delete the surface from the drawing and create a referene.)
Same thing would hold true for your alignmnets, profiles, corridors etc.....
This drawing would tax any PC to the limits your describing.
Rick Jackson
Survey CAD Technician VI
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.