(defun c:mini_chg_units (  / old_cmd tmp ss )
	(mai_start nil)
	(mai_last_com "mini_dwg_m2mm")
	(mai_make_panel_up 
		(list
		   "【实体坐标单位变换】" ;对话框标题
		  (list "选择"
				(list "全图由米转为毫米" "(setq tmp 1000 txt \"全图由米转为毫米\")")
				(list "全图由毫米转为米" "(setq tmp 0.001 txt \"全图由毫米转为米\")")
				nil
				(list "全图由厘米转为毫米" "(setq tmp 10 txt \"全图由厘米转为毫米\")")
				(list "全图由毫米转为厘米" "(setq tmp 0.1 txt \"全图由毫米转为厘米\")")
				nil
				(list "全图由米转为厘米" "(setq tmp 100 txt \"全图由米转为厘米\")")
				(list "全图由厘米转为米" "(setq tmp 0.01 txt \"全图由厘米转为米\")")
				nil
				(list "将实体X与Y坐标调换" "(setq tmp 0 txt \"将实体X与Y坐标调换\")")
		  )
		)
	)
	(cond
		((not tmp) (exit))
		((= 0 tmp)
		  (setq ss (mai_select_first nil "选择要将X与Y坐标调换的实体:" "没有找到实体."))
		  (command "_.mirror" ss "" "non" (list 0 0 0) "non" (list 10 10 0) "y")
		)
		(T
		  (command "_.layer" "thaw" "*" "unlock" "*" "on" "*" "")
		  (command "_.ucs" "")
		  (command "_.plan" "")
		  (if (setq ss (ssget "x"))
		      (progn
			    (command "_.scale" ss "" "non" (list 0 0 0) tmp)
				(princ (strcat "\n成功将" txt  "。"))
			  )
		  )
		)
	)
	(mai_end)
)
