Is there what you lookin for?
'//virtual Acad::ErrorStatus
'//AcDbCurve::getSplitCurves(
'//const AcGePoint3dArray& points,
'//AcDbVoidPtrArray& curveSegments) const;
Public Shared Sub BreakCurve()
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Using doclock As DocumentLock = doc.LockDocument
Using tr As Transaction = db.TransactionManager.StartTransaction()
Try
Dim bt As BlockTable = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
Dim btr As BlockTableRecord = DirectCast(tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite), BlockTableRecord)
Dim opt As PromptEntityOptions = New PromptEntityOptions(Environment.NewLine & "Select curve to break: ")
Dim eres As PromptEntityResult = ed.GetEntity(opt)
If eres.Status <> PromptStatus.OK Then
Return
End If
Dim ent As Entity = (CType(tr.GetObject(eres.ObjectId, OpenMode.ForRead, False), Entity))
Dim opt1 As PromptPointOptions = New PromptPointOptions(Environment.NewLine & "Enter a first point")
Dim opt2 As PromptPointOptions = New PromptPointOptions(Environment.NewLine & "Enter a second point")
Dim res1 As PromptPointResult = ed.GetPoint(opt1)
Dim p As Point3d = res1.Value
opt2.BasePoint = p
opt2.UseBasePoint = True
Dim res2 As PromptPointResult = ed.GetPoint(opt2)
Dim pts As Point3dCollection = New Point3dCollection
pts.Add(res1.Value)
pts.Add(res2.Value)
Dim curv As Curve = (CType(tr.GetObject(ent.ObjectId, OpenMode.ForWrite, False), Curve))
Dim objs As DBObjectCollection = curv.GetSplitCurves(pts)
If objs.Count > 0 Then
MessageBox.Show("Objects: " & objs.Count.ToString)
For Each obj As DBObject In objs
btr.AppendEntity(obj)
tr.AddNewlyCreatedDBObject(obj, True)
Next
ent.Erase()
ent.Dispose()
tr.Commit()
End If
Catch ex As Exception
MessageBox.Show(ex.StackTrace)
Finally
tr.Dispose()
End Try
End Using
End Using
End Sub
~'J'~