minji兄小弟认为不用赋予名字的直线使用Handle属性就可以了!
小弟写了段测试代码应该可以解决这个问题
Sub test() On Error Resume Next Dim line As AcadLine Dim test As String Dim Startpoint(0 To 2) As Double Dim Endpoint(0 To 2) As Double Startpoint(0) = 0: Startpoint(1) = 10: Startpoint(2) = 0 Endpoint(0) = 0: Endpoint(1) = 100: Endpoint(2) = 0 Set line = ThisDrawing.ModelSpace.AddLine _ (Startpoint, Endpoint) ZoomAll test = line.Handle MsgBox test, vbOKOnly End Sub 对话框里字符串就是Handle