<CommandMethod("TESTFILLET")> _
Public Sub testFillet()
Dim doc As Document = _
Application.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Dim Db As Database = doc.Database
Dim pEntRes1 As PromptEntityResult = ed.GetEntity( _
"Select first line to Fillet")
If pEntRes1.Status <> PromptStatus.OK Then
Return
End If
Dim obj1 As String = pEntRes1.ObjectId.ObjectClass.Name
If String.Compare(obj1, "AcDbLine", True) <> 0 Then
ed.WriteMessage("Select line entity" + vbLf)
Return
End If
Dim pEntRes2 As PromptEntityResult = ed.GetEntity( _
"Select second line to Fillet")
If pEntRes2.Status <> PromptStatus.OK Then
Return
End If
obj1 = pEntRes2.ObjectId.ObjectClass.Name
If String.Compare(obj1, "AcDbLine", True) <> 0 Then
ed.WriteMessage("Select line entity" + vbLf)
Return
End If
Dim strHandle1 As String = _
pEntRes1.ObjectId.Handle.ToString()
Dim strEntName1 As String = _
"(handent """ & strHandle1 & """)"
Dim strHandle2 As String = _
pEntRes2.ObjectId.Handle.ToString()
Dim strEntName2 As String = _
"(handent """ & strHandle2 & """)"
Dim strCommand As String = _
"_fillet" + vbCr + "r" + vbCr + "0.495" + _
vbCr + strEntName1 + vbCr + strEntName2 + vbCr
doc.AcadDocument.SendCommand(strCommand)
End Sub