;文字改斜归正[mini_gxgz].lsp
(defun c:mini_gxgz ( / old_cmd e box mpt ang ss)
	(mai_start nil)
	(mai_last_com "mini_gxgz")
	(setq
		ss
			(mai_select_first
				'((0 . "*TEXT"))
				"选择要改斜归正单行文本:<退出>"
				"没有找到单行文本."
			)
	)
	(foreach e (mai_ssget_2_list SS)
		(setq
			box (mai_text_box e)
			mpt (mai_3p_2p (mai_divide_point (car box) (caddr box) 0.5))
			ang (/ (angle (car box) (cadr box)) pi)
		)
		(and
			(not (equal ang 0.5 0.01))
			(or	(equal ang 1.5 0.01)
				(< 0.5 ang 1.5)
			)
			(command "_.rotate" e "" "non" mpt 180)
		)
	)
	(mai_end)
)

