<BR>Dim lineobj As AcadLine<BR>Dim selobj As AcadObject, selpnt As Variant<BR>Dim mp1(0 To 2) As Double '起点<BR>Dim mp2(0 To 2) As Double '终点<BR>ThisDrawing.Utility.GetEntity selobj, selpnt, "请选择目标直线"<BR> If (selobj.EntityName = "AcDbLine") Then<BR> Set lineobj = selobj<BR> mp1(0) = lineobj.StartPoint(0)<BR> mp1(1) = lineobj.StartPoint(1)<BR> mp2(0) = lineobj.EndPoint(0)<BR> mp2(1) = lineobj.EndPoint(1)<BR>End If