motee-z Posted September 10, 2014 Share Posted September 10, 2014 any idea how to get text height when i picked single line text Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 10, 2014 Share Posted September 10, 2014 Hi. Try this . (if (setq s (ssget "_+.:S" '((0 . "TEXT,MTEXT")))) (setq hgt (cdr (assoc 40 (entget (ssname s 0))))) ) Quote Link to comment Share on other sites More sharing options...
motee-z Posted September 10, 2014 Author Share Posted September 10, 2014 hello tharwat thanks for reply can we extract text height from this selection method (setq 1pt(entget (car (entsel "\nSelect text: ")))) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 10, 2014 Share Posted September 10, 2014 can we extract text height from this selection method (setq 1pt(entget (car (entsel "\nSelect text: ")))) Sure , but you have to be sure that the user selected a text and not any other object Anyway here it goes . (setq hgt (cdr (assoc 40 1pt))) Quote Link to comment Share on other sites More sharing options...
motee-z Posted September 10, 2014 Author Share Posted September 10, 2014 thank you tharwat for your kindness Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 10, 2014 Share Posted September 10, 2014 thank you tharwat for your kindness You are welcome anytime . Have a read of THIS which consist of all related DXF codes for the single line text Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 11, 2014 Share Posted September 11, 2014 (edited) VL example same thing no test for if text (setq obj (vlax-ename->vla-object(car (entsel "\nSelect text: ")))) (vla-get-textstring obj) ; text entered (vla-get-height obj) ; height of text (vla-get-rotation obj) ; text angle ; to mention a few if you want more download Dumpit.lsp this will produce list ; or (entget (car (entsel))) ; this will show dxf code numbers like 40 above Edited September 12, 2014 by BIGAL Quote Link to comment Share on other sites More sharing options...
Tharwat Posted September 11, 2014 Share Posted September 11, 2014 BIGAL , the OP is asking for text height and not for text string 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.