The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 Tips and Tricks
 How to DELETE a block from all drawings...

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Admin Posted - March 27 2002 : 5:43:27 PM
Have you ever wanted to go through all your drawings and ERASE a particular block... maybe it was a bad title-block, or a bad company logo, or you just don't need a date/time stamp anymore.

Well, here is a handy lisp file that works excellently with Hurricane.

http://www.74mph.com/lisp/delblk.zip

When you run DELBLK from the command line, then just give it the name of the block you want to blow-away. It will go through and ERASE all instances of it (very quickly too)

<i>If you want delete a block, but don't know WHAT the name of the block is, then just select the block and type "LIST", there you should get your AutoCAD "Text Window", or scrollback buffer. And the contents should look something like this...</i>

Command: LIST
1 found
BLOCK REFERENCE Layer: 0
Space: Model space
Handle = 80C
DEMOBLOCK1 <i><-- This is the block name !!</i>
at point, X= 0.0000 Y= 0.0000 Z= 0.0000
X scale factor 1.0000
Y scale factor 1.0000
rotation angle 0
Z scale factor 1.0000

From this example, the block is called DEMOBLOCK1, so this is what you would type at the DELBLK prompt when asked for the block name.

So here is an example you can cut and paste into Hurricane using DEMOBLOCK1 above... (of course you would change the name from DEMOBLOCK1 to whatever your block name is!)

<font face='Courier New'>;BEGIN SCRIPT
(LOAD "DELBLK.LSP") <i>(assuming delblk.lsp is in your AutoCAD path)</i>
DELBLK
DEMOBLOCK1
;END</font id='Courier New'>

And say goodbye to DEMOBLOCK1... As simple as that...

<i>NOTE: You might want to follow this script-up with a PURGE script to make sure the sucker is out of your drawing for good.</i>

Hope this helps!!

Regards,
Bill
8   L A T E S T    R E P L I E S    (Newest First)
n/a Posted - January 16 2008 : 2:07:03 PM
I didn't write the lisp so I'm not certain, but I think it looked like it should have erased the block, but probably did not purge it. I've modified the attached file a little, hoping that the mods would purge the blocks, also. If it does not do that for you as furnished here, I don't think I will be able to do much more with it. It would be great to hear in a few minutes that it worked for you, though ! Good luck !!

Download Attachment: Delnulblocks.zip
1.72 KB
mbicm Posted - January 16 2008 : 1:51:11 PM
i think you removed the deleting part from the lsp.
it found the block and says it needs purging but it didnt delete it.
n/a Posted - January 16 2008 : 10:44:26 AM
I'm sorry !! The file needs to be renamed from .zip to .lsp. The forum's security doesn't like .lsp files outright. "Delnulblks" will run the lisp after it is renamed. Be sure to check it out on test files, though !!
mbicm Posted - January 16 2008 : 10:41:16 AM
invalid or corrupt zip file
n/a Posted - January 16 2008 : 10:20:33 AM
Bill,
I'm under the gun, and can't take time to check this out, but I've got this lisp routine that deletes "nul" blocks. I'm not sure if that is the same as "empty" blocks or not. Also not sure if it does nested blocks.

I thought I'd post it in case you had time to run a test and see if it might be of use here. (It originally did nul text/mtext also, but I commented that out so as not to remove more than is intended here.)

Download Attachment: Delnulblocks.zip
1.66 KB
mbicm Posted - January 16 2008 : 09:47:46 AM
hmm.. now that you mention it, they are deleted (i was deleting blocks with nothing in them so i couldnt see the results)

its too bad this dont work with nested blocks. i got some of these empty blocks inside blocks...
Admin Posted - January 16 2008 : 09:12:25 AM
Hmm... yes, seems that it does throw an error for me too... BUT the blocks are deleted.
(if you don't see them deleted, just REGEN)

Regards,
Bill
mbicm Posted - January 16 2008 : 08:55:15 AM
i dunno if you wrote the lisp routine, bill but i get an error.

enter block name to delete ... CPM
0; error: too many arguments


The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.2 seconds. Snitz Forums 2000