快速找出2个type中的不同属性
- VB code
Type block blockName As String handel As StringEnd TypeType line lineName As String handel As StringEnd TypeSub yjjc() Dim ent As AcadEntity Dim arrblock() As block ReDim arrblock(3000) Dim arrline() As line ReDim arrline(3000) Dim cntb As Long cntb = 0 Dim cntl As Long cntl = 0 For Each ent In ThisDrawing.ModelSpace Select Case ent.ObjectName Case "AcDbBlockReference" arrblock(cntb).blockName = getXdataByText(ent, "点号") arrblock(cntb).handel = ent.handle cntb = cntb + 1 If cntb = 3000 Then ReDim Preserve arrblock(10000) End If Case "AcDbPolyline" arrline(cntl).lineName = getXdataByTextForLine(ent, "点号") arrline(cntl).handel = ent.handle cntl = cntl + 1 If cntl = 3000 Then ReDim Preserve arrline(10000) End If End Select NextEnd Sub
现在2个TYPE中都有 blockName 为"DX1","DX2","DX3",lineName 为"DX1" ,请问怎么遍历得到DX2和DX3 存到数组里...
[解决办法]
type是语句,不是对象,哪有属性?只能是元素
[解决办法]