View Full Version : Explodeing Blocks
bruno.vankogelenberg
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?
RobertB
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.
bruno.vankogelenberg
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
bruno.vankogelenberg
2004-08-19, 03:32 PM
THANKS
This really works
WooW
Ed Jobe
2004-08-19, 03:52 PM
Workarounds really are fun!?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.