MUTHUKUMAR1983 Posted May 16, 2023 Share Posted May 16, 2023 (DEFUN C:FLR() (COMMAND "PDMODE" 3)(COMMAND "-LAYER" "S" "Field-Line" "") (SETQ P1(GETPOINT "\n PICK FIELD LINE START POINT :") P2(GETPOINT P1 "\n PICK FIELD LINE END POINT :") P3(GETPOINT P1 "\n PICK RIGHT SIDE :") AN1(ANGLE P1 P2) ) (COMMAND "UCS" "3" P1 P2 P3 "") (REPEAT 100 (vl-vbaload "E:/FMB Cadd/Field Line.dvb") (VL-VBARUN "FL") (SETQ GS(GETSTRING "\n FIELD LINE NUMBER :") YV(GETREAL "\n ENTER LINE LENGTH VALUE:") XV(GETREAL "\n ENTER OFFSET VALUE:") th(atof(getvar "users1")) ) ; (COMMAND "DELAY" 60) ;(COMMAND "POINT" (LIST XV YV) ) (COMMAND "CIRCLE" (LIST XV YV)(+ TH 0.2) ) ;(COMMAND "DELAY" 60) (ENTMAKE (LIST (CONS 0 "TEXT") (CONS 100 "AcDbEntity") (CONS 100 "AcDbText") (CONS 10 (trans (LIST XV YV) 1 0)) ; POINT (CONS 40 th) (CONS 7 (GETVAR 'textstyle)) (CONS 8 (getvar "CLAYER")) (CONS 62 1) (CONS 1 GS) ;VALUE (CONS 50 0 ) (CONS 72 1) (CONS 11 (LIST XV YV)) (CONS 73 2) )) ) (vl-vbaload "E:/FMB Cadd/Field Line.dvb");testdial (VL-VBARUN "FL") ) Quote Link to comment Share on other sites More sharing options...
Isaac26a Posted May 16, 2023 Share Posted May 16, 2023 (edited) Use this ;;; just72 (left->0, center->1, right->2,aligned (if vertical alignment=0)->3) ;;; just73 (baseline->0, bottom->1, middle->2,top->3) (cons 72 just72) ;;; Horizontal Alignment (cons 73 just73) ;;; Vertical Alignment ;; or if you are using "just" numbers '(72 . 1) '(73 . 2) And the insertion point should be 11 instead of 10 Edited May 16, 2023 by Isaac26a 2 Quote Link to comment Share on other sites More sharing options...
Steven P Posted May 16, 2023 Share Posted May 16, 2023 These have always worked for me if you don't want to entmod the text. (defun c:jul() (jut "l")) ;;ju: Justify + l: Left (defun c:juc() (jut "c")) ;; c: centre (defun c:jur() (jut "r")) ;; r: right (defun c:jutl() (jut "tl"));; t: top (defun c:jutc() (jut "tc")) (defun c:jutr() (jut "tr")) (defun c:juml() (jut "ml"));; m: middle (defun c:jumc() (jut "mc")) (defun c:jumr() (jut "mr")) (defun c:jubl() (jut "bl"));; b: Bottom (defun c:jubc() (jut "bc")) (defun c:jubr() (jut "br")) (defun jut (just / var ent) (setq var (getvar "CMDECHO")) (setvar "CMDECHO" 0) ;;https://www.cadtutor.net/forum/topic/35569-text-justification-lisp/ (princ (strcat "\nSelect Text")) (if (setq ss (ssget "_:L" '((0 . "ATTDEF,MTEXT,TEXT")))) (command "_.justifytext" ss "" just) ) (setvar "CMDECHO" var) (princ) ) 1 Quote Link to comment Share on other sites More sharing options...
MUTHUKUMAR1983 Posted May 16, 2023 Author Share Posted May 16, 2023 THANKS Isaac26a Quote Link to comment Share on other sites More sharing options...
MUTHUKUMAR1983 Posted May 16, 2023 Author Share Posted May 16, 2023 THANKS Steven P NICE PROGRAM Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.