;图形转正[mini_txzz].lsp
(defun c:mini_txzz ( / old_cmd ang ent)
	(mai_start nil)
	(mai_last_com "mini_txzz")
	(initget "S")
	(setq ang (getangle "\n[选择正看实体(S)输入沿Z轴旋转角度:<恢复原始视图>"))
	(if (= ang "S")
		(setq
			ang nil
			ent (mai_Entsel T "选择正看实体:<回车恢复原始视图>" "没有找到实体." nil nil)
		)
	)
	(cond
		(	(not (or ang ent))
			(command "_.ucs" "")
		)
		(	ang
			(setq ang (/ ang pi))
			(command "_.ucs" "z" ang)
		)
		(	ent
			(command "_.ucs" "ob" ent)
		)
	)
	(command "_.plan" "")
	(mai_end)
)

