yshf 发表于 2014-4-9 22:11:35

试试这个Sub test()
    '将DLSS层上所有多段线的全局宽度改为0
    On Error Resume Next
   
    Dim Ssd As AcadSelectionSet
    Dim FType(0 To 1) As Integer
    Dim FData(0 To 1) As Variant
    Dim TeObj As Object
   
    FType(0) = 0
    FType(1) = 8
   
    FData(0) = "LWPOLYLINE"
    FData(1) = "DLSS"
   
    ThisDrawing.SelectionSets("Ssd").Delete
   
    '创建选择集(选择图层为DLSS,图元实体为文字的选择集)
    Set Ssd = ThisDrawing.SelectionSets.Add("Ssd")
    Ssd.Select acSelectionSetAll, , , FType, FData
    For Each TeObj In Ssd
      TeObj.ConstantWidth = 0
    Next
   
End Sub
页: 1 [2]
查看完整版本: vba怎么实现修改指定图层的线宽和文字高度