Trying to get Entmake Text to work
I've looked all over and have tried different versions of the Entmake text command, but I can't get mine to work. This is my function: (defun CreateText (txtStyle txtJust insertPt txtString) (if (= txtJust "tc") (setq horJust 1 verJust 3)) (if (= txtJust
forums.autodesk.com
| (entmake (list (cons 0 "TEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbText") (cons 7 txtStyle) ;Text style name (cons 10 insertPt) ;First alignment point (cons 11 insertPt) ;Second alignment point (cons 1 txtString) ;Default value (the string itself) (cons 50 0) ;Text rotation (cons 71 0) ;Flags 0=Normal, 2=Backward, 4=Upside down (cons 72 horJust) ;Horizontal text justification, 0=Left,1=Center, 2=Right, 4=Center, 5=Fit (cons 73 verJust) ;Vertical text justification, 0=Baseline, 1=Bottom, 2=Middle, 3=Top ) ) |
(entmake (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 1 nVal) (cons 7 nStyle) (cons 8 nLayer) (cons 10 nIns) (cons 40 cTh) (cons 41 0.0) (cons 50 0.0) (cons 71 2) (cons 72 1) ) ;list ) ;entmake |
반응형
'autocad' 카테고리의 다른 글
| DXF_TEXT (0) | 2025.05.27 |
|---|---|
| Calculate @ Relative Coordinates XYZ (0) | 2025.05.23 |
| OSNAP mode (0) | 2025.05.20 |
| Get Coordinates for the screen display (0) | 2025.05.19 |
| Using path with Space Blank in lisp (2) | 2025.05.16 |