i have found this tool to change the justification of m and dtext i believe, but it is to much for me, all i need is 1 line to add to the autocounter tool to set the justify at left.
- ; *** JUSTIFY.LSP ***;; Changes the justification of text to:-; Left, Center, Right, Aligned, Middle, Fit,; Bottom left, center or right,; Middle left, center or right, OR; Top left, center of right;(defun C:JUSTIFY (/ a a1 a2 a3 a4 t m n n1 p1 p q j j0 n2 j1 j2 q1 index dummy) (setvar "cmdecho" 0) (graphscr) (prompt "\n * Select text to change justification...")(terpri) (setq t (ssget)) (if $just (setq dummy nil) (setq $just "C") ) (prompt "\n * Enter appropriate letter or select from pull down menu...") (initget "L C R A M F BL BC BR ML MC MR TL TC TR") (setq j1 (getkword (strcat "\n * L/C/R/M/A/F/BL/BC/BR/ML/MC/MR/TL/TC/TR: "))) (if (= j1 "") (setq j1 $just) (setq $just j1) ) (setq m (sslength t) index 0) (repeat m (setq a (entget (ssname t index)) p (cdr (assoc 0 a))) (if (= p "TEXT") (progn (setq j (assoc 72 a) j2 (assoc 73 a) p (assoc 10 a) q (assoc 11 a) j0 (cdr j)) (if (or (= j1 "L")(= j1 "C")(= j1 "R")(= j1 "M") (= j1 "BL")(= j1 "BC")(= j1 "BR") (= j1 "ML")(= j1 "MC")(= j1 "MR") (= j1 "TL")(= j1 "TC")(= j1 "TR")) (if (= j0 0) (progn (setq p1 (cdr p) q1 (cons (car q) p1) n1 (subst q1 q a)) ) (progn (setq q1 (cdr q) p1 (cons (car p) q1) n1 (subst p1 p a)) ) ) ) (if (or (= j1 "A")(= j1 "F")) (progn (prompt "\n ") (prin1 (+ index 1)) (setq a1 (getpoint "\nEnter first alignment point...") a2 (getpoint "\nEnter second alignment point...") a3 (cons (car p) a1) a4 (cons (car q) a2) n1 (subst a3 p a) n2 (subst a4 q n1)) ) ) (cond ((= j1 "L") (setq n (subst '(72 . 0) j n1)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "C") (setq n (subst '(72 . 1) j n1)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "R") (setq n (subst '(72 . 2) j n1)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "A") (setq n (subst '(72 . 3) j n2)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "M") (setq n (subst '(72 . 4) j n1)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "F") (setq n (subst '(72 . 5) j n2)) (setq n (subst '(73 . 0) j2 n))) ((= j1 "BL") (setq n (subst '(72 . 0) j n1)) (setq n (subst '(73 . 1) j2 n))) ((= j1 "BC") (setq n (subst '(72 . 1) j n1)) (setq n (subst '(73 . 1) j2 n))) ((= j1 "BR") (setq n (subst '(72 . 2) j n1)) (setq n (subst '(73 . 1) j2 n))) ((= j1 "ML") (setq n (subst '(72 . 0) j n1)) (setq n (subst '(73 . 2) j2 n))) ((= j1 "MC") (setq n (subst '(72 . 1) j n1)) (setq n (subst '(73 . 2) j2 n))) ((= j1 "MR") (setq n (subst '(72 . 2) j n1)) (setq n (subst '(73 . 2) j2 n))) ((= j1 "TL") (setq n (subst '(72 . 0) j n1)) (setq n (subst '(73 . 3) j2 n))) ((= j1 "TC") (setq n (subst '(72 . 1) j n1)) (setq n (subst '(73 . 3) j2 n))) ((= j1 "TR") (setq n (subst '(72 . 2) j n1)) (setq n (subst '(73 . 3) j2 n))) ) (entmod n) ) ) (setq index (+ index 1)) ) (prin1) (princ " Changed ") ; Print total lines changed (princ index) (princ " text lines.") (terpri) (princ))
|