Author Topic: 7mb file with no objects  (Read 2168 times)

0 Members and 1 Guest are viewing this topic.

HasanCAD

  • Swamp Rat
  • Posts: 1423
7mb file with no objects
« on: February 04, 2014, 07:02:23 AM »
attached file is around 7mb but have no objects

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: 7mb file with no objects
« Reply #1 on: February 04, 2014, 07:23:18 AM »
How did you create such a file?
CAD Tech

HasanCAD

  • Swamp Rat
  • Posts: 1423
Re: 7mb file with no objects
« Reply #2 on: February 04, 2014, 07:32:04 AM »
we recived this file

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: 7mb file with no objects
« Reply #3 on: February 04, 2014, 07:40:47 AM »
Start the purge command and instead of showing the items that can be purged, select the option to show items that cannot be purged.
CAD Tech

HasanCAD

  • Swamp Rat
  • Posts: 1423
Re: 7mb file with no objects
« Reply #4 on: February 04, 2014, 07:56:55 AM »
What is this kind of block. and How to purge?

Jeff_M

  • King Gator
  • Posts: 4100
  • C3D user & customizer
Re: 7mb file with no objects
« Reply #5 on: February 04, 2014, 08:49:51 AM »
The file has a lot of linetypes (41552) from a MicroStation file. Deleting the dictionary holding these linetypes then allows those anonymous blocks to be purged and the file goes to ~460kb. I used this lisp to remove the linetypes:
Code - C#: [Select]
  1. (defun c:deldgnltstyle ( / dicts dict)
  2.   (setq
  3.     dicts (vlax-get (vla-get-activedocument (vlax-get-acad-object))
  4.                     'dictionaries
  5.           )
  6.  )
  7.  (setq dict (vlax-invoke dicts 'item "ACAD_DGNLINESTYLECOMP"))
  8.   (princ (strcat "\nDGN Linetypes before: "
  9.                  (itoa (vla-get-count dict))
  10.          )
  11.   )
  12.   (vla-delete dict)
  13.   (princ "\nACAD_DGNLINESTYLECOMP Dictionary removed!")
  14.   (princ)
  15. )
  16.  

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: 7mb file with no objects
« Reply #6 on: February 04, 2014, 09:10:58 AM »
I used AutoCAD's AECTOACAD command and it dropped the file down to 45kb.  BOOM!!
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

HasanCAD

  • Swamp Rat
  • Posts: 1423
Re: 7mb file with no objects
« Reply #7 on: February 04, 2014, 09:12:00 AM »
The file has a lot of linetypes (41552) from a MicroStation file. Deleting the dictionary holding these linetypes then allows those anonymous blocks to be purged and the file goes to ~460kb. I used this lisp to remove the linetypes:
Code - C#: [Select]
  1. (defun c:deldgnltstyle ( / dicts dict)
  2.   (setq
  3.     dicts (vlax-get (vla-get-activedocument (vlax-get-acad-object))
  4.                     'dictionaries
  5.           )
  6.  )
  7.  (setq dict (vlax-invoke dicts 'item "ACAD_DGNLINESTYLECOMP"))
  8.   (princ (strcat "\nDGN Linetypes before: "
  9.                  (itoa (vla-get-count dict))
  10.          )
  11.   )
  12.   (vla-delete dict)
  13.   (princ "\nACAD_DGNLINESTYLECOMP Dictionary removed!")
  14.   (princ)
  15. )
  16.  

Thankx Jeff_M for the lisp purged the original file comes from 10MB to 2.5MB

ronjonp

  • Needs a day job
  • Posts: 7533
Re: 7mb file with no objects
« Reply #8 on: February 04, 2014, 09:13:39 AM »
And old school wblocking over itself  ;D

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

HasanCAD

  • Swamp Rat
  • Posts: 1423
Re: 7mb file with no objects
« Reply #9 on: February 04, 2014, 09:44:45 AM »
And old school wblocking over itself  ;D
thnax ronjonp