lufan82 发表于 2005-12-15 18:49:00

高手到指导一下子,有个问题

Sub aa()
Dim aaa As AcadEntity
Dim aa As AcadPolyline
Dim sset As AcadSelectionSet
Dim f1(1) As Integer
Dim f2(1) As Variant
Set sset = ThisDrawing.SelectionSets.Add("tt")
f1(0) = 8
f2(0) = "0001"
f1(1) = 0
f2(1) = "Polyline"
sset.Select acSelectionSetAll, , , f1, f2
For Each aaa In sset
Set aa = aaa
Next
End Sub
这样取某一层的一个多边形为什么取不出来啊
msgbox aaa.objectname打印出来是Polyline类形的啊

莫名 发表于 2005-12-15 21:52:00

Dim aa As AcadPolyline
可以选取出来,但不是AcadPolyline 是AcadLWPolyline对象

lufan82 发表于 2005-12-16 10:22:00

此地果然高手多,按照版主的方法搞定了,谢谢
页: [1]
查看完整版本: 高手到指导一下子,有个问题