

So there is some occasional – and understandable – confusion around Explode() or Purge() not working as expected.

Purge() checks a list of objects for ones that can safely be erased, and then it’s up to the caller of the function to do so. Explode() populates a DBObjectCollection with the results of the explode operation, and it’s then up to the caller of the function to add them to the appropriate location (typically the current – i.e. The way in which Explode() and Purge() differ from their “equivalent” commands is that they’re non-destructive: they don’t actually result in a change to the AutoCAD drawing database. I realised recently – on receiving this comment – that I hadn’t specifically covered the nature of Entity.Explode() in a post (even if it’s been used in a few of them, over the years).Įntity.Explode() is one of those tricky methods: it’s actually a faux-ami with the AutoCAD command of the same name, in a very similar way to Database.Purge().


If your block has variable attributes, this standard explode will loose their values - they are replaced with attribute definitions - AttDef. When exploding blocks (block references) inserted in an AutoCAD DWG drawing you will get by default the original block definition. Four methods for exploding blocks in AutoCAD.
