你的问题在我这里没有出现:- Sub GetLinePnt()
- Dim returnobj As AcadEntity, basepnt As Variant, pnt As Variant, line1 As Variant
- ActiveDocument.Utility.GetEntity returnobj, basepnt, "选择第一根线段:"
- Select Case returnobj.ObjectName
- Case "AcDbLine"
- Set line1 = returnobj
- pnt = line1.StartPoint
- Case "AcDbLWPolyline", "AcDbPolyline"
- Set line1 = returnobj
- pnt = line1.Coordinates()
- End Select
- Debug.Print pnt(0) & " " & pnt(1) & " " & pnt(2)
- End Sub
|