;检查标注误差值显红[mai_dim_chk].lsp

(defun c:mai_dim_chk (/ e fuzz i int measure o ss)
	(mini_start nil)
	(princ "\n检查标注误差值显红 作者:小萝卜头 2011.04.21 Rev1.1")
	(setq
		fuzz 5 ;_误差值
		ss (mai_select_first '((0 . "dimension")) "选择需要检查误差值的标注,问题标注显红:<退出>" "没有找到标注.")
	)
	(foreach E (mai_ssget_2_list SS)
		(and
			(setq O (vlax-ename->vla-object E))
			(setq int (vlax-get-property o 'textoverride))
			(setq int
					(if (= int "")
						(vlax-get-property o 'measurement)
						(atof int)
					)
			)
			(setq int (atoi (rtos int 2 0)))
			(/= (rem int fuzz) 0)
			(vla-put-color o 1)
		)
	)
	(mai_end)
)