Jump to content
salmonrose

Delete unused blocks

Recommended Posts

salmonrose

Hi,

I have an CAD file with a lot blocks which I don't use. I would like to delete them. So I do "Purge" which took care of some but not all. There are still a lot of "cannot purge" blocks. So I do "Insert", I see about 30 blocks. Choosing one of those, I can edit the block. (Doing the "Insert" was just my beginner's test step to see how many unwant blocks I still have.) I believe they cannot be purged because they are nested.

 

How can I delete the 'cannot be purged" unused blocks?

 

I know a lot of the blocks have other blocks nested in them. Is deleting the 'parent' blocks enough for me to purge?

 

Thanks.

 

PS: I only have limited knowledge with AutoCAD, so please be more specific of what to do.

Edited by salmonrose
Added info

Share this post


Link to post
Share on other sites
Grant

If you have a block or nested block in the drawing then you will not be able to purge them. You will need to get rid of every instance of that block before you can purge it out.

Share this post


Link to post
Share on other sites
SLW210

Use _QSELECT and use the different options available to select the blocks and delete them. Purge is not a delete tool, it purges UNUSED block definitions, dimension styles, layers, linetypes, text styles, zero-length geometry and empty text objects.

 

ALL references to a block must be erased before you can purge the block definition.

 

P.S.

 

Do any of the blocks have names that start with *?

Share this post


Link to post
Share on other sites
designerstuart
Doing the "Insert" was just my beginner's test step to see how many unwant blocks I still have
i do the same, but i use RENAME. this lists lots of objects in the drawing, which i find better than using the design center (Ctrl+2)

 

as mentioned above, if you delete all the instances of a block, whether nested or not, you can purge their definitions and they will be gone forever.

Share this post


Link to post
Share on other sites
sleepy86

I have the same problem. It's terrible because the file size is big

Share this post


Link to post
Share on other sites
BIGAL

Purge renaming etc will not work !!! Very simple with CIV3d run PURGESTYLES this will remove unused styles this in turn allows the purging of unused blocks that are linked to a style as well as layers linetypes etc. Styles lock their child components. To get a style back simplest way is IMPORTSTYLES. Did one today removed 330 styles then purged etc

Share this post


Link to post
Share on other sites
Ski_Me

He may have blocks that were part of a xref those cannot be purged unless the xref is detached

Share this post


Link to post
Share on other sites
RobDraw
He may have blocks that were part of a xref those cannot be purged unless the xref is detached

 

This information is not correct. Blocks from an XREF do not get inserted to the referencing file. XREFs do not increase file size by any noticeable amount.

Share this post


Link to post
Share on other sites
jade1331

So i have tried many things to get rid of older blocks that where somehow imported into our template. I can see them I hit Ctrl+2, some of the ones I want to get rid of have names like "A$C51A644A3"

 

I have tried the filter option and the _qselect. Filter allows me to select those blocks but after searching each of my layouts and model space I did not see them. _qselect does not give me an option to select these type of blocks by name. They are not listed in the drop down menu and if I manually enter the name it highlights every object.

 

Do you have any suggestions... i just want to delete every instance of the object... if it happens to delete something with it that would be fine just as long as the blocks are gone.

 

Thank you if you respond I know it was years ago when you posted your comment. :)

 

 

Use _QSELECT and use the different options available to select the blocks and delete them. Purge is not a delete tool, it purges UNUSED block definitions, dimension styles, layers, linetypes, text styles, zero-length geometry and empty text objects.

 

ALL references to a block must be erased before you can purge the block definition.

 

P.S.

 

Do any of the blocks have names that start with *?

Share this post


Link to post
Share on other sites
ReMark

It could be that you have instances of anonymous blocks in your drawing. Please attach a copy of the drawing file to your next post. Someone here will take a look at it. If the file is too large then you'll have to use a file sharing website like Dropbox.

Share this post


Link to post
Share on other sites
Victery1

If your unpurgeable block names begin with *A, then try this...

 

Sub deleteUnpurgableBlks()

Dim blk As acadBlock

Dim blks As AcadBlocks

 

Set blks = ThisDrawing.Blocks

For Each blk In blks

If LEFT(UCase$(blk.name), 2) = "*A" Then

blk.Delete

End If

Next

 

End Sub

Share this post


Link to post
Share on other sites
CantCacheMe

I had the same issue and ran across this fix. I did just what they said. I typed in -wblock, found a place and new name to save my drawing, typed *, opened the new drawing and all of my blocks were gone. I also had a lot of layers that were nested within the blocks that I had been trying to get rid of and they were all gone too.

Hopefully, this will be helpful to you. I can't take credit for it if it works though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×