Jump to content

Delete unused blocks


Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 *?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 years later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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 *?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 4 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...