AutoCAD VBA 遍历所有对象

Public Sub ErgodicDim()

    Dim ent As AcadEntity '对象基类

       
    For Each ent In ThisDrawing.ModelSpace '所有对象
        If TypeOf ent Is AcadText Then '单行文本
            '访问ent的属性和方法
        ElseIf TypeOf ent Is AcadMText Then '多行文本
          
        ElseIf TypeOf ent Is AcadDimension Then '标注
         
        End If
    Next

End Sub

你可能感兴趣的:(Java/JSP/ASP/)