'获取标注尺寸函数 Function FixDimMeas(Dimension As AcadDimension) As Long Dim BlockCount As Long Dim bz As Long
BlockCount = ThisDrawing.Blocks.Count '遍历块中的对象,取得标注尺寸 Dim EntityInBlock As AcadEntity For Each EntityInBlock In ThisDrawing.Blocks(BlockCount - 1) If EntityInBlock.ObjectName = "AcDbMText" Then bz = Dimension.Measurement FixDimMeas = bz '取得标注尺寸 Exit For End If Next End Function