PDA

View Full Version : Hidden Objects!!!, Need help



sandeep_koodal
2010-06-29, 08:50 AM
Hi,
I attached a dwg with hidden objects,
Nothing there, but the size approx. 2.0 mb, don't know how.
Some layers are remaining, can't purge out.

Thanks in advance
Sandeep

a_meteni
2010-06-29, 02:48 PM
If you use PURGE command and click on : VIEW ITEMS YOU CANNOT PURGE , you will find some items still in the drawing ( blocks, text styles,....)
you can use -WBLOCK command as follows:
Command: -WBLOCK
Enter name of existing block or
[= (block=output file)/* (whole drawing)] <define new drawing>: *

sandeep_koodal
2010-06-30, 03:27 AM
Yes! the only thing is Wblock. i did it with "entire drawing" and reduce the size.
But I want to know why that objects are hidden? and how can i find them?
bcz we received a bundle of drawings like that.
:roll::?:


If you use PURGE command and click on : VIEW ITEMS YOU CANNOT PURGE , you will find some items still in the drawing ( blocks, text styles,....)
you can use -WBLOCK command as follows:
Command: -WBLOCK
Enter name of existing block or
[= (block=output file)/* (whole drawing)] <define new drawing>: *

irneb
2010-06-30, 07:32 AM
Firstly there's some registered apps:
Command: -pu
-PURGE
Enter type of unused objects to purge
[Blocks/Dimstyles/LAyers/LTypes/MAterials/Plotstyles/SHapes/textSTyles/Mlinestyl
es/Tablestyles/Visualstyles/Regapps/All]: r
Enter name(s) to purge <*>:
Verify each name to be purged? [Yes/No] <Y>: n
Deleting registered application "ACAD_EXEMPT_FROM_CAD_STANDARDS".
Deleting registered application "AcadAnnotativeDecomposition".
Deleting registered application "AcadNonAnnoHatchDecomposition".
Deleting registered application "BRBA_WELD".
Deleting registered application "RAK".
Deleting registered application "REVIT".
6 registered applications deleted.Simply doing this brought the size down from 2319kb to 1303kb.

The dictionaries seem reasonable, at least the top-level:
Command: (entget (namedobjdict))
((-1 . <Entity name: 79d89cd0>) (0 . "DICTIONARY") (330 . <Entity name: 0>) (5
. "1A") (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "ACAD_BACKGROUND")
(350 . <Entity name: 72078dc8>) (3 . "ACAD_COLOR") (350 . <Entity name:
72038360>) (3 . "ACAD_GROUP") (350 . <Entity name: 79d89cc0>) (3 .
"ACAD_IMAGE_DICT") (350 . <Entity name: 72038080>) (3 . "ACAD_IMAGE_VARS") (350
. <Entity name: 72038388>) (3 . "ACAD_LAYOUT") (350 . <Entity name: 72038168>)
(3 . "ACAD_MATERIAL") (350 . <Entity name: 720382b8>) (3 . "ACAD_MLEADERSTYLE")
(350 . <Entity name: 72078808>) (3 . "ACAD_MLINESTYLE") (350 . <Entity name:
79d89cc8>) (3 . "ACAD_PLOTSETTINGS") (350 . <Entity name: 72038170>) (3 .
"ACAD_PLOTSTYLENAME") (350 . <Entity name: 72038158>) (3 . "ACAD_SCALELIST")
(350 . <Entity name: 72078738>) (3 . "ACAD_TABLESTYLE") (350 . <Entity name:
72038368>) (3 . "ACAD_VISUALSTYLE") (350 . <Entity name: 720382d8>) (3 .
"AcadDim") (350 . <Entity name: 72078b68>) (3 . "ACDB_RECOMPOSE_DATA") (350 .
<Entity name: 72078f38>) (3 . "ACDBVARIABLEDICTIONARY") (350 . <Entity name:
79d89e10>) (3 . "AEC_PROPERTY_SET_DEFS") (350 . <Entity name: 72078ce0>) (3 .
"BNS_VARIABLES") (350 . <Entity name: 72078d78>))But there's a hell of a lot of groups. I had to hit Esc because it simply keeps on scrolling.
Command: (dictsearch (namedobjdict) "ACAD_GROUP")
<Entity name: 7203e070>) (3 . "*A15228") (350 . <Entity name: 72027d78>) (3 .
"*A15229") (350 . <Entity name: 720460a8>) (3 . "*A1523") (350 . <Entity name:
.......
7204c008>) (3 . "*A15227") (350 .

Command: *Cancel*

Command: (setq grp (dictsearch (namedobjdict) "ACAD_GROUP") s nil)
nil

Command: (length grp)
91686So there's more than 91000 groups in the drawing. Unfortunately I don't know of a way of removing them without programming ... you can't use -GROUP Remove * ... it needs a name for each, and most are anonymous.

Anyhow, here's the code I used:
(defun c:ClearGroups (/ grps n item count name)
(if (setq grps (dictsearch (namedobjdict) "ACAD_GROUP"))
(progn
(setq n (length grps)
count 0
) ;_ end of setq
(while (>= (setq n (1- n)) 0)
(setq item (nth n grps))
(cond
((= (car item) 3)
(entdel (dictremove (cdr (assoc -1 grps)) (cdr item))) ;Delete the group entry
(setq count (1+ count))
)
) ;_ end of cond
) ;_ end of while
(princ (strcat "\n" (itoa count) " groups removed."))
) ;_ end of progn
(princ "\nNo groups found.")
) ;_ end of if
(princ)
) ;_ end of defunIt just took a hell of a long time to clear the drawing. After which the file size dropped to 335kb.

a_meteni
2010-06-30, 07:43 AM
Yes! the only thing is Wblock. i did it with "entire drawing" and reduce the size.
But I want to know why that objects are hidden? and how can i find them?
bcz we received a bundle of drawings like that.
:roll::?:

Your drawing contains 20 blocks most of them are invalid and the rest are nested inside these invalied blocks that cannot be purged with all of its layers, text styles,.........
trying to rename all these invalid blocks will consume much time.
my advice is to use a script file to WBLOCK these drawings.

sandeep_koodal
2010-06-30, 07:49 AM
Thanks a million Irneb !!!
If i make a wblock of this dwg., size also reducing.
at that time where the groups are going?

irneb
2010-06-30, 08:14 AM
Thanks a million Irneb !!!
If i make a wblock of this dwg., size also reducing.
at that time where the groups are going?The groups are simply holders of entities, you can erase the entities, but this doesn't remove the groups. It's slightly similar to block definitions in that way. But as I've shown it takes an extremely long time to fix this. The WBlock is a much quicker method ... and using scripts it would be possible to set this to run on 100's of DWG files. It "should" also get rid of those "invalid" blocks.

These blocks seem to be PaperSpaces which didn't "automatically" get purged after the tab's been deleted. There's about 10 of them & 4 unnamed blocks. Here's the list of blocks:
Command: (setq doc (vla-get-activedocument (vlax-get-acad-object)))
#<VLA-OBJECT IAcadDocument 0c6ed848>

Command: (setq blks (vla-get-blocks doc))
#<VLA-OBJECT IAcadBlocks 0c13cd84>

Command: (vlax-for b blks (print (vla-get-name b)))

"*MODEL_SPACE"
"*PAPER_SPACE"
"_DOT"
"ADCADD_ZZ"
"plan-id4"
"north1"
"*X4"
"*X5"
"2002-24x36"
"NOTENUM"
"*Paper_Space8"
"*Paper_Space9"
"*Paper_Space10"
"MtZTTL"
"*X12"
"*X13"
"*Paper_Space14"
"*Paper_Space15"
"*Paper_Space16"
"*Paper_Space17"
"*Paper_Space18"
"*Paper_Space19"
"*Paper_Space20"
"*Paper_Space21"
"*Paper_Space22"
"*Paper_Space23"The WBlock should get rid of all these as well ... so I'm seconding a_meteni's advise.

sandeep_koodal
2010-06-30, 08:32 AM
Thanks Guys,
learned a new lesson today
:):Puffy:


Your drawing contains 20 blocks most of them are invalid and the rest are nested inside these invalied blocks that cannot be purged with all of its layers, text styles,.........
trying to rename all these invalid blocks will consume much time.
my advice is to use a script file to WBLOCK these drawings.


The groups are simply holders of entities, you can erase the entities, but this doesn't remove the groups. It's slightly similar to block definitions in that way. But as I've shown it takes an extremely long time to fix this. The WBlock is a much quicker method ... and using scripts it would be possible to set this to run on 100's of DWG files. It "should" also get rid of those "invalid" blocks.

These blocks seem to be PaperSpaces which didn't "automatically" get purged after the tab's been deleted. There's about 10 of them & 4 unnamed blocks.
The WBlock should get rid of all these as well ... so I'm seconding a_meteni's advise.

Coolmo
2010-07-03, 02:55 AM
Thanks Guys,
learned a new lesson today
:):Puffy:

Here's a lesson. Call the the company/person you received the drawings from and tell them that your hiring for a boatload of money.. wine em, dine 'em, win 'em over and convince them to leave their current position, hire them... and the FIRE them for putting so much garbled crizap into their drawing files that they send out. Lesson... Learned......

sandeep_koodal
2010-07-05, 03:53 AM
Yes, we sent the dwg as a reply without any objects and 2.0 mb of size. and challenge them to reduce the size.
No reply!!!!!!!



Here's a lesson. Call the the company/person you received the drawings from and tell them that your hiring for a boatload of money.. wine em, dine 'em, win 'em over and convince them to leave their current position, hire them... and the FIRE them for putting so much garbled crizap into their drawing files that they send out. Lesson... Learned......

irneb
2010-07-05, 07:22 AM
Here's a lesson. Call the the company/person you received the drawings from and tell them that your hiring for a boatload of money.. wine em, dine 'em, win 'em over and convince them to leave their current position, hire them... and the FIRE them for putting so much garbled crizap into their drawing files that they send out. Lesson... Learned......Nasty ... very very nasty :veryevil:

...
...

But I like !:twisted: