Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Removing nested block from main block

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
lgabriel
9045 Views, 10 Replies

Removing nested block from main block

I get an AutoCAD drawing from my conveyor manufacturer who have buried a block (tagname) in all of their conveyor blocks.

 

The only way to remove them is to manually use BEDIT and erase the tagname block. Very time consuming

 

Is there a way through Autolisp to search all blocks in a drawings and if the tagname block is part of the definition of the conveyor block, erase the tagname block or redefine the conveyor block without the tagname block.

10 REPLIES 10
Message 2 of 11
Lee_Mac
in reply to: lgabriel

Message 3 of 11
dmfrazier
in reply to: lgabriel

How about just re-defining the "tagname" block into something inconsequential, like a node (point) or a small circle on a noplot layer?

Message 4 of 11
3wood
in reply to: dmfrazier

Just delete everything from "tagname" in BEDIT.

Message 5 of 11
Lee_Mac
in reply to: lgabriel

Alternatively, my Delete Blocks program will delete all references of one or more blocks from a drawing.

Message 6 of 11
lgabriel
in reply to: lgabriel

To all above suggestions, thank you for your responses. The DELBLOCKS.lsp does exactly what I need.

Message 7 of 11
Lee_Mac
in reply to: lgabriel

Excellent - you're welcome! Smiley Happy

Message 8 of 11
dmfrazier
in reply to: 3wood


@3wood wrote:

Just delete everything from "tagname" in BEDIT.


The reason I wouldn't do that is that I don't like the idea of having a block definition in the dwg that cannot be easily "found".  (It's probably just me, though. Smiley Embarassed)

Message 9 of 11
3wood
in reply to: lgabriel


lgabriel wrote:

 

To all above suggestions, thank you for your responses. The DELBLOCKS.lsp does exactly what I need.


I marked Lee's suggestion as the solution if you don't mind.

Message 10 of 11
colinesplin
in reply to: Lee_Mac

This lisp routine did exactly what I was hoping. Thank you so much!

Message 11 of 11

Perfect for a file with 300 blocks nested in 300 other blocks! saved me a lot of time. 10/10 would recommend 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost