Hi Thomas,
To use an API-equivalent of AecObjExplode, even ARX would not be
sufficient - you need full OMF which is ADT-specific C++ API based on ARX.
The only workaround would be along the lines proposed by Joel. I happen to
have such VBA code that also needs some LISP commands (since no .Explode for
ADT objects) that does roughly what you need. First, the object (AecArea in
this case) is copied, then exploded twice and finally the resulting
pimitives are extracted. This should work OK for an Area like in the code
below, but you may have some problems with e.g walls due to the wall graph
connectivity and cleanup (not sure if the wall copy would clean properly).
Anyway, this is best I can suggest and it's up to you to test all individual
objects and situations. Here's the macro:
Public Sub ExtractAecAreaCurves()
' Select Area to copy
Dim ent As AcadEntity
Dim pnt As Variant
ThisDrawing.Utility.GetEntity ent, pnt, "Select AecArea"
If ent.ObjectName <> "AecDbArea" Then
MsgBox "Not an AecArea"
Exit Sub
End If
Dim cObjs(0 To 0) As Object
Set cObjs(0) = ent
Dim retObjs As Variant
retObjs = ThisDrawing.CopyObjects(cObjs)
'MsgBox "Copied ent = " & retObjs(0).ObjectName & "/" & retObjs(0).Handle
ThisDrawing.SetVariable "USERS1", retObjs(0).Handle
ThisDrawing.SendCommand "(command ""EXPLODE"" (handent(getvar
""USERS1"")))" & vbCr
' Exploded Result must be only one BlkRef
If ThisDrawing.ActiveSelectionSet.Count <> 1 Then
'... delete ents and some msg.
Exit Sub
Else
If ThisDrawing.ActiveSelectionSet(0).ObjectName <> "AcDbBlockReference"
Then
'... delete it and some msg.
Exit Sub
Else
Set ent = ThisDrawing.ActiveSelectionSet(0)
End If
End If
'MsgBox "First-Exploded ent = " & ent.ObjectName & "/" & ent.Handle
ThisDrawing.SetVariable "USERS1", ent.Handle
ThisDrawing.SendCommand "(command ""EXPLODE"" (handent(getvar
""USERS1"")))" & vbCr
For Each ent In ThisDrawing.ActiveSelectionSet
MsgBox "Second-Exploded ents = " & ent.ObjectName & "/" & ent.Handle
If ent.ObjectName = "AcDbLine" Then
' get data from this line...
ElseIf ent.ObjectName = "AcDbArc" Then
' get data from this arc...
End If
ent.Delete
Next
End Sub
Hope this helps.
--
Cheers,
Miro
========================
Miroslav Schonauer
Developer Technical Services
Autodesk
========================
"Joel Houtman"
wrote in message
news:3DA321F0.4200D16@earthlink.net...
> I don't know if this helps but I get the points of the Roof Slab objects
very
> simply with
> VBA. I just momentarily create an exact copy of the slab, then explode it.
It
> turns into 3d faces and some lines. Collect the points and then delete the
> exploded objects
> leaving me with the original slab and all the points.
>
> Thomas Kohler wrote:
>
> > Thanks Peter for your clear answer!
> >
> > Because I cannot wait until my whishes come true, I'm looking for a work
> > around.
> > I'm not eager for working with ObjectARX but I would do it, if there is
no
> > other way.
> > What do you think about an 'Explode' work around? I guess the main
problem
> > would be
> > to 'mark' the AEC Objects in a way I could find (identify) them again.
> >
> > In the meantime I downloaded ObjectARX. I searched in the Help-Files,
> > but I could not get any idea how this could help me. Also the terms
> > Object Modeling Framework (OMF) I could not find there.
> > Can you tell me some other hints, how I should proceed ?
> >
> > Reagards
> >
> > Thomas
> >
> > "Peter Funk - Autodesk, Inc" schrieb im
> > Newsbeitrag news:01B4A1F9F4D4F0DD82A55B2C0F407A6F@in.WebX.maYIadrTaRb...
> > > Thomas,
> > >
> > > As you are discovering, ADT objects are different from standard
AutoCAD
> > > objects. The way the objects deal with graphics is a good illustration
of
> > > this difference. With a standard AutoCAD "Circle", the graphic
returned
> > are
> > > a circle, no matter how you look at it. In the case of a door, the
> > graphics
> > > primitives are determined by how you are looking at the door, and what
you
> > > want the door to look like. In plan view, a simple door will be made
of a
> > > line, and an arc. In 3D, the door will be made with a body (6 faces).
> > >
> > > In your case, you are looking for the boundary of the space or area (2
> > > different objects, 2 different type libraries). In the current
> > > implementation, this profile is exposed to ActiveX. However, this is
on
> > the
> > > wish list for a future release. As suggested, with ObjectARX and the
> > Object
> > > Modeling Framework (OMF) this information is readly available.
> > >
> > > Regards,
> > >
> > >
> > >
> > >
>