|
发表于 2010-6-5 11:16:00
|
显示全部楼层
Private Sub Test()
Dim sco As Integer
Dim sSet As AcadSelectionSet
Dim ftype(0) As Integer
Dim fdata(0) As Variant
Dim xx As AcadText
ftype(0) = 0
fdata(0) = "TEXT"
With ThisDrawing
On Error Resume Next
If Not IsNull(.SelectionSets.Item("MySetSelectionSet")) Then
Set sSet = .SelectionSets.Item("MySetSelectionSet")
sSet.Delete
End If
Set sSet = .SelectionSets.Add("MySetSelectionSet")
End With
sSet.Select acSelectionSetAll, , , ftype, fdata
sco = sSet.Count
Set xx = sSet.Item(1)
xx.color = acBlue
End Sub
这样可以了,你参考一下 |
|