cad vba 二次开发统计管线图中含有B的块名

Public Sub ListBlocks()
Dim objBlock As AcadBlock
Dim strBlockList As String
Dim B As String

    strBlockList = "List of blocks: "
    
  For Each objBlock In ThisDrawing.Blocks
      If objBlock.Name Like "B*" Then
        strBlockList = strBlockList & vbCr & objBlock.Name
            End If
    Next

    MsgBox strBlockList
End Sub
 

你可能感兴趣的:(VBA,CAD,管线测量,开发语言,经验分享,笔记)