- Set sset1 = ThisDrawing.SelectionSets.Add("SSbks")
- Dim FilterType(0 To 1) As Integer
- Dim FilterData(0 To 1) As Variant
- FilterType(0) = 0: FilterData(0) = "INSERT"
- FilterType(1) = 2: FilterData(1) = "MyBlockName"
- sset1.Select acSelectionSetAll, , , FilterType, FilterData
…如何访问块,选择集中的对象处于什么状态?它是AcadEntity,还是AcadObject或AcadBlockReference,还是作为其他内容存储在选择集中。我现在想从这里访问属性,但为了检查它是否是正确的对象类型,我需要放置什么?/选择集中项目的变量名是什么 0 Then
Set BlockX = sset1.Item(0)
If BlockX.HasAttributes Then
attribX = BlockX.GetAttributes
For countz = LBound(attribX) To UBound(attribX)
Select Case attribX(countz).TagString
Case "FIX1"
fx1descTXT.text = attribX(countz).TextString
Case "FIX2"
fx2descTXT.text = attribX(countz).TextString
Case "FIX3"
fx3descTXT.text = attribX(countz).TextString
Case "FIX4"
fx4descTXT.text = attribX(countz).TextString
Case "FIX5"
fx5descTXT.text = attribX(countz).TextString
Case "FIX6"
fx6descTXT.text = attribX(countz).TextString
Case "FIX7"
fx7descTXT.text = attribX(countz).TextString
Case "FIX8"
fx8descTXT.text = attribX(countz).TextString
Case "FIX9"
fx9descTXT.text = attribX(countz).TextString
Case "FIX10"
fx10descTXT.text = attribX(countz).TextString
End Select
Next 'End countx HasAttributes check loop..
End If
End If
[/code]
我希望这能把事情弄清楚