;;改变文字对齐方式，保持位置不变.
(defun c:ChangeTextAlignment (/ $KEY LDCL SS text_align:act:*)
  (setq
    ldcl '("Alignment"
	   (:DIALOG
	    (LABEL "飞诗CAD－修改文字对齐点")
	    "spacer;"
	    (:BOXED_COLUMN
	     (LABEL "附加对齐")
	     (:ROW
	      (:BTN (LABEL "左") (KEY "L"))
	      (:BTN (LABEL "中") (KEY "中"))
	      (:BTN (LABEL "右") (KEY "右"))
	     )
	     (:ROW
	      (:BTN (LABEL "对齐") (KEY "A"))
	      (:BTN (LABEL "中间") (KEY "M"))
	      (:BTN (LABEL "调整") (KEY "F"))
	     )
	     "spacer;"
	    )
	    (:BOXED_COLUMN
	     (LABEL "基本对齐")
	     (:ROW
	      (:COLUMN
	       (:BTN (LABEL "左上") (KEY "TL"))
	       (:BTN (LABEL "左中") (KEY "ML"))
	       (:BTN (LABEL "左下") (KEY "BL"))
	      )
	      (:COLUMN
	       (:BTN (LABEL "中上") (KEY "TC"))
	       (:BTN (LABEL "正中") (KEY "MC"))
	       (:BTN (LABEL "中下") (KEY "BC"))
	      )
	      (:COLUMN
	       (:BTN (LABEL "右上") (KEY "TR"))
	       (:BTN (LABEL "右中") (KEY "MR"))
	       (:BTN (LABEL "右下") (KEY "BR"))
	      )
	     )
	     "spacer;"
	    )
	    "spacer;"
	    (:BUTTON (IS_CANCEL TRUE) (LABEL "KEY") (LABEL "取消"))
	   )
	   "btn"
	   (:BUTTON (HEIGHT 3.5))
	  )
  )
  (defun text_align:act:* () (return $Key))
  (setq $Key (fsxm-ldcl ldcl "Text_Align"))
  (or $Key (fsxm-silenceexit))

  ;(setvar "cmdecho" 0)
  (setq ss (ssget '((0 . "ATTDEF,*text"))))
  (or ss (fsxm-silenceexit))
  (command ".JUSTIFYTEXT" ss "" $Key)
  (princ)
)