View Full Version : Explodeing Blocks

2004-08-18, 02:18 PM
When I try to explode Blockreferences in VBA I get the message " invalid input".
This appears to happen only when these references are not uniformally scaled. Does someone know a workaround?
Altering the scale prior to exploding could be an option but how do you readjust then result (which can be anything) then?

2004-08-18, 05:11 PM
Sorry, the Explode method doesn't work with non-uniformly scaled block references. SendCommand is your only option that I am aware of.

2004-08-19, 09:58 AM
I've tried that as well, but I can't get SendCommand to react to my selectionset.
ThisDrawing.SendCommand "explode" & vbCr & "P" & vbCr & vbCr

It works when I use SelectOnScreen , but not with an automated selection.

Ed Jobe
2004-08-19, 02:11 PM
Try this Bruno.

ThisDrawing.SendCommand "EXPLODE " & Ent2LspEnt(oBlk) & vbcr

Public Function Ent2LspEnt(entObj As AcadEntity) As String
'Designed to work with SendCommand, which can't pass objects.
'This gets an objects handle and converts it to a string
'of lisp commands that returns an entity name when run in SendCommand.
Dim entHandle As String

entHandle = entObj.Handle
Ent2LspEnt = "(handent " & Chr(34) & entHandle & Chr(34) & ")"
End Function

2004-08-19, 03:32 PM

This really works


Ed Jobe
2004-08-19, 03:52 PM
Workarounds really are fun!?