Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to delete a block without name?

1 view
Skip to first unread message

Jeff Pool

unread,
Oct 11, 1999, 3:00:00 AM10/11/99
to
Hi Kathrin,
I was having the same problem with " " block names and the only way I could get rid of them was with a free program called Superpurge (better yet it's free). I downloaded it from            www.sup...@manusoft.com    or     www.manusoft.com        You will  have to do a hard purge but it will take out the " " block. Hope this helps

Jeff

Kathrin Bombrowski wrote:

Hi all,
once more I need your well-tried help.
In our company permanently come up drawings with a strange defect, propably
caused by an application.
In the symbol table there is a block named "". This thing is causing errors
when doing a dxfout and then dxfin, or when using a xref containing this
defect. (And it is propably contained in some of about 500 detail drawings,
which users permanently insert as blocks ...)

I can neither purge nor rename it.
WBLOCK with BLOCKNAME:* did not help.

I tried a little lisp as follows, but entmode just as entdel did not work.
Does anybody have an idea, how to get rid of this block? Do I something
wrong in the lisp code? If you want to try it, a little drawing with this
defect is attached. And, we use R14.

(defun leerbl (/ ele a)
  (if (setq a (tblsearch "BLOCK" ""))
      (progn
         (setq ele (entget (tblobjname "BLOCK" "")))
  (setq ele (subst (cons 2 "LEERBLOCK") (assoc '2 ele) ele)
               ele (subst (cons 3 "LEERBLOCK") (assoc '3 ele) ele)
  )
  (if (entmod ele)
      (print "success")
      (print "nothing")
  )
       )
  )
)

Thanks in advance,
Kathrin

                    Name: unn_Block.dwg
   unn_Block.dwg    Type: AutoCAD Drawing (application/x-unknown-content-type-AutoCAD.Drawing.14)
                Encoding: x-uuencode

Silvio C. Camolesi

unread,
Oct 11, 1999, 3:00:00 AM10/11/99
to
Hi...do you try to creat a routine that work with wblock command?
In my office I never use purge, but only wblock in 2d drawings in model
space...
For paperspace I made a script routine that uses the same wblock
command...this command like you must know get only the entitys that appear
in screen, and tables blocks not referenced aren´t saved...


Owen Wengerd

unread,
Oct 11, 1999, 3:00:00 AM10/11/99
to
Jeff:

>I was having the same problem with " " block names and the only
>way I could get rid of them was with a free program called
>Superpurge (better yet it's free).

Thanks for recommending SuperPurge, however it is not free. A shareware
version of SuperPurge is available for download from
http://www.manusoft.com/spurge.htm, but the shareware version may only be
used for up to 30 days to try the program before purchasing. :)
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com

kamal Boutora

unread,
Oct 12, 1999, 3:00:00 AM10/12/99
to
at this url, you'll find the kbtools library, where then function kbentdelx
has been exposed from arx. You can use this function to delete any object
without calling the purge function. It's usefull for removing attribs,
vertex from POLYLINES, styles, layers, but be carefull when using it, no
control is done when it is called...
use them at your own risk.

Also provided in this little library:
* Access to the clipboard from autolisp,
* Appending vertex's to polylines and attribs to inserts.

the url is http://synapse-informatique.hypermart.net/kbtools


Currently avaible for autocad R 14 only.

hope this helps.
Kamal Boutora
http://synapse-informatique.hypermart.net

Kathrin Bombrowski

unread,
Oct 13, 1999, 3:00:00 AM10/13/99
to
Hi Kamal,
thanks for your help. I was happy, because it looked like kbentdelx is
exactly what I need. But when trying it I was not able to kill that block
without name.
Here is what I did (on command line):

Befehl: (setq o (tblobjname "block" ""))
<Elementname: 48a0998>

Befehl: (kbentdelx o)
nil

Befehl: (setq er (kberror))
105

Other functions like kbsetclipboard and kbgetclipboard work well.
Does kbentdelx not work for this special block, or is there another problem
(e.g. my not-english version of autocad14)?
And what says this kberror?
It would be great, if you could fix this.

TIA,
Kathrin

kamal Boutora

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Hi kathrin,
you're right. At initial purpose, the kbentdelx could remove any object from
a dwg, but, as this kbentdelx was not very secure to be used by anybody i've
modified it so that you can use it to remove only entitys.
I'm emailing you directly the 'unmodified' version of kbtools, be carefull
when using it.
---
The reason of failure:
I've discovered that tblobjname doent not return for blocks the
AcDbBlockTableRecord, but the AcDbBlockBegin

By Getting the AcDbBlockTableRecord, it is possible to directly modify
with lisp the block name.

The function kbentdelx could not erase blocks because with tblobjname,
we were getting the AcDbBlockBegin, and that the AcDbBlockTableRecord
contains a hard pointer to it (the AcDbBlockBegin).

The function KbDelBlock is provided for this purpose: erasing blocks given
their names.
---
Kbtools is avaible at:
http://synapse-informatique.hypermart.net/kbtools


Kathrin Bombrowski

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Thanks, Kamal -THIS IS GREAT!!!
Kathrin

0 new messages