[野狼谷]笨鸟 09:12:31
深海鱼(363629078) 2013-11-5 01:01:22
大家好,我是新来的,感觉这个群来得太晚了。
真是一个很好的群
来得是够晚的,都一点了:01:01:22
不过我们还是灰常欢迎!
[野狼谷]笨鸟 09:13:15
[ddbb2008]笨笨(1325710361) 2013-11-5 00:17:04
Sub aq()
Dim bobj As AcadBlockReference
Dim a
Dim arr()
Dim ss As AcadSelectionSet
Dim filtertype(0 To 0) As Integer
Dim filterdata(0 To 0) As Variant
Dim xls As Excel.Application
Set xls = New Excel.Application
Set ss = ThisDrawing.SelectionSets.Add(CStr(Rnd))
filtertype(0) = 0
filterdata(0) = "insert"
ss.SelectOnScreen filtertype, filterdata
For Each bobj In ss
i = i + 1
ReDim  reserve arr(1 To i)
a = bobj.GetAttributes
arr(i) = a(0).TextString
Next
With xls.Workbooks.Add
.Sheets(1).[a1].Resize(i, 1) = xls.Transpose(arr)
.SaveAs "d:/123.xls"
.Close
End With
xls.Quit
End Sub
相比lisp vb代码实在太啰嗦了
[ahwx0814]雨中漫 09:13:21
应该说来的太早了,早晨1点就到了,太厉害了
我都没起过这么早
[ahwx0814]雨中漫 09:14:35
主要是lisp不用定义变量而且变量类型可以随意改动,太方便了,
[野狼谷]笨鸟 09:16:39
精炼易懂的代码对于编程维护非常重要
lambda是梦幻的,也是梦魇的 |