利用下面代码段,我可以访问到块的名称,现在想访问块编辑“增强属性编辑器”对话框里面“文字选项”面板内“高度”这个属性,不知道怎么访问到呢?
Dim blkColl As AcadBlocks
Set blkColl = ThisDrawing.Blocks
'扫描图块集合
For Each elem In blkColl
Msg elem.Name
Next
已经解决,谢谢这个论坛,答案在三楼
ThisDrawing.SelectionSets("ss1").Delete
Set sset = ThisDrawing.SelectionSets.Add("ss1") '新建一个选择集
sset.SelectOnScreen '提示用户选择
For Each elemEnt In sset
If elemEnt.ObjectName = "AcDbBlockReference" Then
If elemEnt.HasAttributes Then
' Get the attributes for the block reference
Dim varAttributes As Variant
varAttributes = elemEnt.GetAttributes
Dim strAttributes As String
Dim I As Integer
For I = LBound(varAttributes) To UBound(varAttributes)
varAttributes(I).Height = 20
Next
End If
End If
Next elemEnt