1个回答
展开全部
输出顶点坐标的格式是什么样的?
Sub a()
Dim retCoord() As Double
Dim a As AcadLWPolyline
Dim i As Integer
Dim Excel As Excel.Application
Dim ExcelSheet As Object
Dim ExcelWorkbook As Object
i = 0
ThisDrawing.Utility.GetEntity a, "Select an object"
retCoord() = a.Coordinates
Set Excel = New Excel.Application
Set ExcelWorkbook = Excel.Workbooks.Open("excel文件目录")
Set ExcelSheet = Excel.ActiveSheet
Excel.Visible = True
On Error GoTo e
Do While CBool(retCoord(i)) <> False
ExcelSheet.Cells(i + 1, 1).Value = retCoord(i)
i = i + 1
Loop
e: Exit Sub
End Sub
Sub a()
Dim retCoord() As Double
Dim a As AcadLWPolyline
Dim i As Integer
Dim Excel As Excel.Application
Dim ExcelSheet As Object
Dim ExcelWorkbook As Object
i = 0
ThisDrawing.Utility.GetEntity a, "Select an object"
retCoord() = a.Coordinates
Set Excel = New Excel.Application
Set ExcelWorkbook = Excel.Workbooks.Open("excel文件目录")
Set ExcelSheet = Excel.ActiveSheet
Excel.Visible = True
On Error GoTo e
Do While CBool(retCoord(i)) <> False
ExcelSheet.Cells(i + 1, 1).Value = retCoord(i)
i = i + 1
Loop
e: Exit Sub
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询