请问如何将下面的编码编写到程序中,是用LSP,VLX???我是在网上下的这段CAD编码,但不知道如何编成程序 Sub GetLenth() Dim ExcelApp As
New Excel.Application Dim ExcelWkbk As Excel.Workbook Set ExcelWkbk = ExcelApp.Workbooks.Add Dim i As Integer i = 1 Dim Ent As
AcadEntity Dim pt1 As Variant, pt2 As Variant With ExcelWkbk.Worksheets("sheet1") For Each Ent In
ThisDrawing.ModelSpace If Ent.ObjectName
=
"AcDbLine"
Then .Range("A" & i)
= i .Range("B" & i)
= Ent.Length i = i + 1 End If Next Ent End With ExcelApp.ActiveWorkbook.SaveAs
"d:\AcadLen.xls" ExcelApp.Workbooks.Close ExcelApp.Quit End Sub
|