.NET

Reply
Active Member
dean0267
Posts: 9
Registered: ‎02-04-2009
Message 1 of 3 (425 Views)

How to explode a block programmatically

425 Views, 2 Replies
02-04-2009 07:55 AM
I am trying to explode a block within a block.
I tried it with SendStringToExecute(_EXPLODE ALL ",False,False,True) but when the statement has executed
it waits on me to hit Enter or any keystroke to unhighlight everything in AutoCAD.
Can anybody show me how to explode a block programmatically in vb.net ?
Distinguished Contributor
JamieVJohnson
Posts: 136
Registered: ‎09-29-2008
Message 2 of 3 (425 Views)

Re: How to explode a block programmatically

02-05-2009 11:12 AM in reply to: dean0267
Explode is a method of blocks (BlockTableRecord) that you can call in VB.Net. Once you call it, you only get a collection of the objects in the block, the original block is still intact. You have to remove the original block, and place the exploded entities where you want them.



If you want to explode a block inside of a block, merely, move the entities from one BlockTableRecord(Nested Block) into the other BlockTableRecord(Parent Block). Explode doesn't even need to be run.



jvj
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 3 of 3 (425 Views)

Re: How to explode a block programmatically

02-05-2009 02:02 PM in reply to: dean0267
There is no Explode method of a BlockTableRecord as it is Block References that can be exploded not Block Definitions. There is an Explode method of the Entity object or ExplodeToOwnerSpace method of the BlockReference object.



As to simply moving obects from one BlockTableRecord to the other. If the OP does want to change the block definition so it has the nested block exploded as opposed to what I suspect they want which is to do a nested explode on the block reference. The BlockTableRecord for the nested block should stay in tact. The BlockReference of the nested block should be removed from the BlockTableRecord of the parent block. The entities from the BlockTableRecord of the nested block should be copied to the BlockTableRecord of the parent block.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community