danyra Posted December 3, 2019 Share Posted December 3, 2019 Im beginner, I have this: (setq p1 (getpoint "\nPunto Inicial:")) (setq p2 (polar p1 (* 1.5 pi) 0.5)) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2))) So, the line I drawn is the yellow one below in the image. And, the text I want put is the magenta one. how can I do this? Thanks for your help Quote Link to comment Share on other sites More sharing options...
ronjonp Posted December 3, 2019 Share Posted December 3, 2019 Why don't you use an attributed block? Quote Link to comment Share on other sites More sharing options...
danyra Posted December 3, 2019 Author Share Posted December 3, 2019 10 minutes ago, ronjonp said: Why don't you use an attributed block? how i can do this? sorry as I said Im a beginner I will glad for your help Quote Link to comment Share on other sites More sharing options...
ronjonp Posted December 3, 2019 Share Posted December 3, 2019 (edited) 3 minutes ago, danyra said: how i can do this? sorry as I said Im a beginner I will glad for your help Like attached: example.dwg Here is code to place that text although it's not how I'd approach it. (setq p1 (getpoint "\nPunto Inicial:")) (setq p2 (polar p1 (* 1.5 pi) 0.5)) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2))) (entmakex (list '(0 . "TEXT") '(100 . "AcDbEntity") '(8 . "YourTextLayer") '(100 . "AcDbText") (cons 10 (mapcar '+ p1 '(0.17 0.29 0.))) '(40 . 0.1) '(1 . "%%UVIGA V-SS01 (.25X.50)") '(50 . 0.) '(41 . 1.) '(51 . 0.) '(11 0. 0. 0.) ) ) Edited December 3, 2019 by ronjonp 1 Quote Link to comment Share on other sites More sharing options...
Jaru Posted December 3, 2019 Share Posted December 3, 2019 Hey man maybe this routine works for you, it's from LeeMac so his credits are his, It is also valid for lines, polylines and blocks. AlignTextToCurveV1-2.lsp Quote Link to comment Share on other sites More sharing options...
danyra Posted December 4, 2019 Author Share Posted December 4, 2019 On 12/3/2019 at 2:13 PM, ronjonp said: (entmakex (list '(0 . "TEXT") '(100 . "AcDbEntity") '(8 . "YourTextLayer") '(100 . "AcDbText") (cons 10 (mapcar '+ p1 '(0.17 0.29 0.))) '(40 . 0.1) '(1 . "%%UVIGA V-SS01 (.25X.50)") '(50 . 0.) '(41 . 1.) '(51 . 0.) '(11 0. 0. 0.) ) ) thanks you for your help, its works. 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.