TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Vince on December 06, 2012, 09:55:33 AM
-
Hello Swamp Members,
I have a AutoCAD drawing file received from a consultant that I need to use on a project. The file size is over 15mb however, from looking at the the drawing it should only be around 1-2mb tops. I deleted all layer filters, purged and audited the drawing but the file size remains around 13mb. I looked into the Purge command options and found blocks that could not be deleted and discovered there were over 2000 block definitions (*A10, *A100, *A101, etc) in the file that was probably the reason for the large file size.
Apparently these Anonymous Blocks are causing the problem......is there any way to delete/purge them from the drawing....?? I tried to copy and paste the visible objects to another clean drawing files but the "Paste" options fails with an "Invalid" error. How can I resolve this difficulty....??
Any assistance would be appreciated...!
Regards,
Vince
-
use _wblock
-
Tried _Wblock and that does not remove the Anonymous Blocks...!
Thanks,
Vince
-
The anonymous block definitions may represent Dynamic Block references in the drawing whose dynamic parameters have been altered following insertion.
Although the *A### prefix is usually used for anonymous groups...
-
Did you see this? http://www.theswamp.org/index.php?topic=35440.msg406672#msg406672 (http://www.theswamp.org/index.php?topic=35440.msg406672#msg406672)
-
Tried _Wblock and that does not remove the Anonymous Blocks...!
Thanks,
Vince
to do for the selected objects and select all
-
I use the code posted by MP here:
http://www.theswamp.org/index.php?topic=9433.msg121365#msg121365
This usually sheds some light on what is going wrong with a drawing.
-
I use the code posted by MP here:
http://www.theswamp.org/index.php?topic=9433.msg121365#msg121365
This usually sheds some light on what is going wrong with a drawing.
1+, a great application 8-)
-
Hi...
- Take a look within dictionaries ->'namedobjdict': sometimes you'll find tons of useless scale-lists and similiars.
- Look for unnamed groups: I found about 10.000 of them in a file!
Regards.
-
If, as I suspect, it is anonymous groups (*A###) that are bloating the drawing file, you could use the following code to delete any anonymous groups in the file (this will not delete any graphical objects):
(defun c:delanongroups
( / i
) )
)
)
)
)
(princ "\nNo anonymous groups deleted.") )
)
-
If you're using a vertical app, you can use the AECTOACAD command and export the current DWG to a new DWG with all AEC objects exploded and broken down to their basic components (I.E. lines, arcs, text).
-
File attached has a LISTGROUPS command, which may be useful as a diagnostic.
Verbose mode lists # entities & selectability for each group.
I've seen files with as many as 10,000 (really!) null groups.
-
I had a similar problem: large file size on small drawing (75 polylines, 25 text objects and ...4000 anonymous groups). All good lisp for drawing cleaning or anon groups removing not worked (yes and wblock not worked !).My solutions:
1.Save file to dxf
2.Close
3.Open
4.Save to dwg
5.Audit
6.Purge
If after step 4 i use explodeproxy from A.Rivilis, it remove 4000 dgn records.
-
Try WBlock, clicking as your selection "Entire Drawing".
This will create a new file, Layout and Model intact.
You select nothing except to navigate to where you want the file and what to name it. (I usually just add XX to the end of the existing file name, then go back and delete the old file before renaming the new one.)
I know, sounds like it would do essentially the same as "SaveAs", but it miraculously leaves behind lots of junk.
-
Here is how we fix problematic drawings:
- Open with RecoverAll
- Audit & Purge
- Wblock the drawing using a window to select objects. NOTE: It is extremely important to not use a crossing window, type All or use "Entire Drawing", as these can all bring the errors over. If you have multiple layout tabs, you will need to wblock them out to separate CAD files and merge them back together.
- Open each drawing and audit and purge again
- Merge drawings back together as needed
- Use the code posted earlier in this thread to remove anonymous groups
- Use the overkill command to remove any overlapping linework
- Remove any unused annotation scale lists
- Audit & Purge again
NOTE: About purging, make sure that you purge Regapps as well, this can only be done with the -purge command or a LISP routine setup to do this.
Yes, this is an annoyingly long list, but this works 99.99% of the time and you will end up with a good drawing that doesn't slow everything down.
-
Here is how we fix problematic drawings:
- Open with RecoverAll
- Audit & Purge
- Wblock the drawing using a window to select objects. NOTE: It is extremely important to not use a crossing window, type All or use "Entire Drawing", as these can all bring the errors over. If you have multiple layout tabs, you will need to wblock them out to separate CAD files and merge them back together.
- Open each drawing and audit and purge again
- Merge drawings back together as needed
- Use the code posted earlier in this thread to remove anonymous groups
- Use the overkill command to remove any overlapping linework
- Remove any unused annotation scale lists
- Audit & Purge again
NOTE: About purging, make sure that you purge Regapps as well, this can only be done with the -purge command or a LISP routine setup to do this.
Yes, this is an annoyingly long list, but this works 99.99% of the time and you will end up with a good drawing that doesn't slow everything down.
very often it is just DGN problem.
http://www.theswamp.org/index.php?topic=42110.msg472514#msg472514
k.