本帖最后由 yshf 于 2013-6-17 22:01 编辑
试试这个- Sub zongtu()
- On Error Resume Next
-
- Dim LayObj As AcadLayer
- For Each LayObj In ThisDrawing.Layers
- If LayObj.Name = "DLSS" Then
- LayObj.Lineweight = 0
- End If
- Next
-
- Dim Ssd As AcadSelectionSet
- Dim FType(0 To 4) As Integer
- Dim FData(0 To 4) As Variant
- Dim TeObj As Object
-
- FType(0) = -4
- FType(1) = 0
- FType(2) = 0
- FType(3) = -4
- FType(4) = 8
-
- FData(0) = "<or"
- FData(1) = "text"
- FData(2) = "mtext"
- FData(3) = "or>"
- FData(4) = "DLSS"
-
- ThisDrawing.SelectionSets("Ssd").Delete
-
- '创建选择集(选择图层为DLSS,图元实体为文字的选择集)
- Set Ssd = ThisDrawing.SelectionSets.Add("Ssd")
- Ssd.Select acSelectionSetAll, , , FType, FData
- For Each TeObj In Ssd
- TeObj.Height = 1.25
- Next
-
- End Sub
|