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

Delete a block reference

8 REPLIES 8
Reply
Message 1 of 9
Speed_CAD
14569 Views, 8 Replies

Delete a block reference

Hi...

How I can delete block reference of database without using purge?

Thank you...
Mauricio Jorquera
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Speed_CAD

Block reference is the block that is inserted into a space, model paper.
Block definition is the block in the block collection. With either one, I
would assume you could use (entdel ename) or (vla-Delete blkobj). If you
get an error, then the block is inserted into the drawing, this would only
occur when trying to delete the block definition from the block collection.

--

Tim
"A blind man lets nothing block his vision."


wrote in message news:5435460@discussion.autodesk.com...
Hi...

How I can delete block reference of database without using purge?

Thank you...
Message 3 of 9
Anonymous
in reply to: Speed_CAD

Maybe (Vla-remove Collection 'Item)
What's wrong with (command "_purge" "b" blockname "") ?

Bob
Message 4 of 9
Speed_CAD
in reply to: Speed_CAD

Hi...

Yes, I know the method to delete an object from visual lisp. The problem is, with purge command it send a message in the command line and that I don't like it... And I don't like the PurgeAll method because it do a regen...
Mauricio Jorquera
Message 5 of 9
Anonymous
in reply to: Speed_CAD

Then does it not work for you?

--

Tim
"A blind man lets nothing block his vision."


wrote in message news:5435469@discussion.autodesk.com...
Hi...

Yes, I know the method to delete an object from visual lisp. The problem is,
with purge command it send a message in the command line and that I don't
like it... And I don't like the PurgeAll method because it do a regen...
Message 6 of 9
Speed_CAD
in reply to: Speed_CAD

Yes... But later I delete the Block and purge. But I don't like to purge because the purge command show me a message in the command line. For example:

Deleting block "$D$".
1 block deleted.
Mauricio Jorquera
Message 7 of 9
Anonymous
in reply to: Speed_CAD

Then delete the blocks definition from the collection.
(vla-Delete
(vla-Item
(vla-get-Blocks
(vla-get-ActiveDocument
(vlax-get-Acad-Object)
)
)
"$D$"
)
)

This will error if the block is inserted anywhere.

--

Tim
"A blind man lets nothing block his vision."


wrote in message news:5435489@discussion.autodesk.com...
Yes... But later I delete the Block and purge. But I don't like to purge
because the purge command show me a message in the command line. For
example:

Deleting block "$D$".
1 block deleted.
Message 8 of 9
Speed_CAD
in reply to: Speed_CAD

yeah.. You are right, that form I did it but I don't test the command purge...

Thanks a lot...
Mauricio Jorquera
Message 9 of 9
Anonymous
in reply to: Speed_CAD

You're welcome.

--

Tim
"A blind man lets nothing block his vision."


wrote in message news:5435491@discussion.autodesk.com...
yeah.. You are right, that form I did it but I don't test the command
purge...

Thanks a lot...

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

Post to forums  

Autodesk Design & Make Report

”Boost