ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB.NET - Explode Entity

1 REPLY 1
Reply
Message 1 of 2
Anonymous
481 Views, 1 Reply

VB.NET - Explode Entity

Hi, Is't possible to have an idea about "how can we explode an entity" using VB.NET. Thanks. Erik
1 REPLY 1
Message 2 of 2
FGansoinat
in reply to: Anonymous

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim appObj As Autodesk.AutoCAD.Interop.AcadApplication
Dim docObj As Autodesk.AutoCAD.Interop.AcadDocument

appObj = GetObject(, "AutoCAD.Application.17")
docObj = appObj.ActiveDocument

Dim regionObj As AcadRegion = docObj.HandleToObject("131")
MsgBox(ExplodeRegion(regionObj).Count)

End Sub

Public Function ExplodeRegion(ByVal regionObj As AcadRegion) As ArrayList
Dim arr As New ArrayList
Dim arrObjects As Object = regionObj.Explode
Dim i As Integer = 0
Dim booIsEndOfIndex As Boolean = False

Do While Not booIsEndOfIndex = True
Try
arr.Add(arrObjects(i))
i = i + 1
Catch ex As Exception
booIsEndOfIndex = True
End Try

Loop

Return arr
End Function

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost