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,
KathrinName: unn_Block.dwg
unn_Block.dwg Type: AutoCAD Drawing (application/x-unknown-content-type-AutoCAD.Drawing.14)
Encoding: x-uuencode
>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
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
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
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