Jump to content

Recommended Posts

Posted

Hi all,

 

I have a requirement to save dwgs I received from a client down to ACAD 04. However in order to do this I need to explode all of the AEC objects which are AecbDbConduit, AecbDbConduitFitting, AecbDbLabelCurve, AecbDbMvPart, AecbDbPipe and AecbDbPipeFitting.

 

I can select these items manually and explode them but I am not sure how to explode them programmatically. The only types that have an explode function in my VBA environment are Acad3DPolyline, AcadBlockReference, AcadExternalReference, AcadLWPolyline, AcadMInsertBlock, AcadPolygonMesh, AcadPolyline and AcadRegion.

But from what I can tell that objects I am trying to explode are not any of the above types. So how would I go about exploding them?

 

Thank you for any guidance you can provide.

Steve

 

 
Sub FindAllTypesNames()
   Dim oEnt As AcadEntity
   Dim TypeName As String

   TypeName = "AecbDb"
   For Each oEnt In ThisDrawing.ModelSpace
       If (InStr(1, oEnt.ObjectName, TypeName) > 0) Then
           If TypeOf oEnt Is AcadRegion Then
               ExpBlock (oEnt)
           End If
       End If
   Next
End Sub
Sub ExpBlock(ByRef BR)
   Dim varEx As Variant
   Dim BRef As AcadRegion
   Dim i As Double

   varEx = BR.Explode
   BR.Delete
   For i = 0 To UBound(varEx)
       If TypeOf varEx(i) Is AcadRegion Then
           Set BRef = varEx(i)
           ExpBlock BRef
       End If
   Next
End Sub

Posted

Just as a thought, have you tried to search on the web for "aec object explode". It brings up a good few solutions :)

Posted

OK, very good Lee Mac. So I am a Luddite :oops:

Posted
OK, very good Lee Mac. So I am a Luddite :oops:

 

Hehe, thought you might like that :)

Posted
See here for info

 

Honest I have been googling that is how I found this website.

 

Let me try this another way. I have the AEC and MEP object enablers installed but I get UNKNOWN command when I try to use any of the AEC commands including AECOBJECTEXPLODE. I also do not see anything in the object browser of VBA to allow me to work with AEC or MEP objects.

 

Is there something else that I need to setup for object enablers to make these commands available to me through VBA?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...