Exploding Blocks??

Exploding Blocks??

Anonymous
Not applicable
352 Views
6 Replies
Message 1 of 7

Exploding Blocks??

Anonymous
Not applicable
Hi folks,
I've got an app. that inserts blocks. But I want the app. to explode the block at insertion time. I've got the block defined as an AcadBlockReference and I get ".explode" as a function I can do on the block. When I run the app I get a run-time error that this is "Not Applicable". What am I missing??
0 Likes
353 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Post your code.

--
Visit me at http://www2.stonemedia.com/franko

"thenrich" wrote in message
news:[email protected]...
> Hi folks,
> I've got an app. that inserts blocks. But I want the app. to explode the
block at insertion time. I've got the block defined as an AcadBlockReference
and I get ".explode" as a function I can do on the block. When I run the app
I get a run-time error that this is "Not Applicable". What am I missing??
0 Likes
Message 3 of 7

Anonymous
Not applicable
If you are working in R14.01 the Explode method does not work.

Joe

thenrich wrote in message
news:[email protected]...
> Hi folks,
> I've got an app. that inserts blocks. But I want the app. to explode the
block at insertion time. I've got the block defined as an AcadBlockReference
and I get ".explode" as a function I can do on the block. When I run the app
I get a run-time error that this is "Not Applicable". What am I missing??
0 Likes
Message 4 of 7

Anonymous
Not applicable
> If you are working in R14.01 the Explode method does not work.

Not without a little help... 😉
The following code uses AcadUnsupp to explode an entity with the AutoCAD
command.

- Adam

Public Function Explode(obj As Object)
'created 3/3/00
'by Adam Waller
'uses the AutoCAD explode command
On Error GoTo ErrHandler
Dim strExpr As String
'ThisDrawing.Utility.GetEntity obj, P1, "Select object to explode"
Dim Unsupp As AcadUnsupp.Application
Set Unsupp =
ThisDrawing.Application.GetInterfaceObject("AcadUnsupp.Application.1")
strExpr = "(command "".explode"" (handent """ & obj.Handle & """))"
Unsupp.EvalLispExpr strExpr
Exit Function
ErrHandler:
AlertAdmin Err, "ESD_Functions.Explode" 'change this to your error
handling function
End Function
0 Likes
Message 5 of 7

Anonymous
Not applicable
In AutoCAD2000 this works for me:

Dim Blockref As Object
Dim InsertionPnt (0 to 2) As Double
Dim InsertSheet As String
Dim TempEnt As Variant
'Other parts of the routine set InsertionPnt, InsertSheet and Sc
Set Blockref = ThisDrawing.ModelSpace.InsertBlock (InsertionPnt,
InsertSheet, Sc, Sc, Sc, 0)
TempEnt = Blockref.Explode
Blockref.Erase

"thenrich" wrote in message
news:[email protected]...
> Hi folks,
> I've got an app. that inserts blocks. But I want the app. to explode the
block at insertion time. I've got the block defined as an AcadBlockReference
and I get ".explode" as a function I can do on the block. When I run the app
I get a run-time error that this is "Not Applicable". What am I missing??
0 Likes
Message 6 of 7

Anonymous
Not applicable
Yury:
watch out the explode does not worked...
1) if the Mtext is in the block
2) if the hatch is in the block

amy

Yury Shafir wrote in message ...
>In AutoCAD2000 this works for me:
>
>Dim Blockref As Object
>Dim InsertionPnt (0 to 2) As Double
>Dim InsertSheet As String
>Dim TempEnt As Variant
>'Other parts of the routine set InsertionPnt, InsertSheet and Sc
>Set Blockref = ThisDrawing.ModelSpace.InsertBlock (InsertionPnt,
>InsertSheet, Sc, Sc, Sc, 0)
>TempEnt = Blockref.Explode
>Blockref.Erase
>
>"thenrich" wrote in message
>news:[email protected]...
>> Hi folks,
>> I've got an app. that inserts blocks. But I want the app. to explode the
>block at insertion time. I've got the block defined as an
AcadBlockReference
>and I get ".explode" as a function I can do on the block. When I run the
app
>I get a run-time error that this is "Not Applicable". What am I missing??
>
0 Likes
Message 7 of 7

Anonymous
Not applicable
Thank you
"amy" wrote in message news:[email protected]...
> Yury:
> watch out the explode does not worked...
> 1) if the Mtext is in the block
> 2) if the hatch is in the block
>
> amy
>
> Yury Shafir wrote in message ...
> >In AutoCAD2000 this works for me:
> >
> >Dim Blockref As Object
> >Dim InsertionPnt (0 to 2) As Double
> >Dim InsertSheet As String
> >Dim TempEnt As Variant
> >'Other parts of the routine set InsertionPnt, InsertSheet and Sc
> >Set Blockref = ThisDrawing.ModelSpace.InsertBlock (InsertionPnt,
> >InsertSheet, Sc, Sc, Sc, 0)
> >TempEnt = Blockref.Explode
> >Blockref.Erase
> >
> >"thenrich" wrote in message
> >news:[email protected]...
> >> Hi folks,
> >> I've got an app. that inserts blocks. But I want the app. to explode
the
> >block at insertion time. I've got the block defined as an
> AcadBlockReference
> >and I get ".explode" as a function I can do on the block. When I run the
> app
> >I get a run-time error that this is "Not Applicable". What am I missing??
> >
>
0 Likes