You could play with this code
''============================cut mline=====================
<DllImport("acad.exe", BestFitMapping:=True, CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto)> _
Private Shared Function acedCmd(ByVal vlist_in As System.IntPtr) As Integer
End Function
<CommandMethod("MCUT")> _
Public Shared Sub CutMline()
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim doc As Document = acApp.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Dim tr As Transaction = db.TransactionManager.StartTransaction()
Using tr
Try
Dim peo As New PromptEntityOptions(vbLf & "Select first mline:")
peo.SetRejectMessage(vbLf & "Select mline only")
peo.AddAllowedClass(GetType(Mline), True)
Dim per As PromptEntityResult = ed.GetEntity(peo)
If per.Status <> PromptStatus.OK Then
Return
End If
Dim fid As ObjectId = per.ObjectId
peo.Message = vbLf & "Select second mline:"
per = ed.GetEntity(peo)
If per.Status <> PromptStatus.OK Then
Return
End If
Dim sid As ObjectId = per.ObjectId
Dim ids As ObjectId() = New ObjectId(1) {}
ids(0) = fid
ids(1) = sid
Dim obj1 As DBObject = tr.GetObject(fid, OpenMode.ForWrite)
Dim obj2 As DBObject = tr.GetObject(sid, OpenMode.ForWrite)
'acApp.SetSystemVariable("FILLETRAD", rad)
acApp.SetSystemVariable("CMDECHO", 0)
Dim buf As New ResultBuffer()
buf.Add(New TypedValue(5005, "_-MLEDIT"))
buf.Add(New TypedValue(5005, "CT")) ''<--change editing option here [CC/OC/MC/CT/OT/MT/CJ/AV/DV/CS/CA/WA]
buf.Add(New TypedValue(5006, fid))
buf.Add(New TypedValue(5006, sid))
buf.Add(New TypedValue(5005, ""))
acedCmd(buf.UnmanagedObject)
buf.Dispose()
acApp.SetSystemVariable("CMDECHO", 1)
tr.Commit()
Catch ex As Autodesk.AutoCAD.Runtime.Exception
ed.WriteMessage(ex.Message + vbLf + ex.StackTrace)
End Try
End Using
End Sub
~'J'~
_____________________________________
C6309D9E0751D165D0934D0621DFF27919