GregGleason Posted March 6, 2018 Share Posted March 6, 2018 Is this the code to collect TEXT entities on the "0" layer with a text height of 1? (ssget "_X" '((0 . "Text")(8 . "0")(40 . 1))) I don't think it's right because I am not getting anything when something really is there. Greg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 7, 2018 Share Posted March 7, 2018 Worked perfect for me tetsing on a real dwg different layer and height found 29 objects. Is it mtext ? Quote Link to comment Share on other sites More sharing options...
rlx Posted March 7, 2018 Share Posted March 7, 2018 Worked perfect for me tetsing on a real dwg different layer and height found 29 objects. Is it mtext ? in which case he could try : (setq ss (ssget "_X" '((0 . "*text")(8 . "0")(40 . 1)))) Gr. Rlx Quote Link to comment Share on other sites More sharing options...
pBe Posted March 7, 2018 Share Posted March 7, 2018 or maybe the value is 1-ish using a range (ssget '((0 . "*text")(8 . "0") (-4 . ">=") (40 . [b]1.0[/b]) (-4 . "<") (40 . [b]1.2[/b]))) Quote Link to comment Share on other sites More sharing options...
rlx Posted March 7, 2018 Share Posted March 7, 2018 or maybe the value is 1-ish using a range (ssget '((0 . "*text")(8 . "0") (-4 . ">=") (40 . [b]1.0[/b]) (-4 . "<") (40 . [b]1.2[/b]))) even better Think it boils down that if someone has a question , post an example drawing along with your shopping list , oh I'm so sorry , I meant your own sample code gr. Rlx Quote Link to comment Share on other sites More sharing options...
GregGleason Posted March 15, 2018 Author Share Posted March 15, 2018 (edited) I kept looking at this and couldn't see why it was not getting anything. The clue to me was that others of you were getting results on your tests, whereas I was getting "nil". As it turned out it wasn't a TEXT entity at all. I looked at the entity closer and it was an ATTDEF entity. So .... when I revised the code to ... (setq ss (ssget "_X" '((0 . "AttDef")(8 . "0")(40 . 1)))) voila, I now get data. Thanks everyone! Greg Edited March 15, 2018 by GregGleason Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 16, 2018 Share Posted March 16, 2018 Now that you have explained it would be best to do (setq ss (ssget "_X" '((0 . "AttDef,*text")(8 . "0")(40 . 1)))) Quote Link to comment Share on other sites More sharing options...
GregGleason Posted March 16, 2018 Author Share Posted March 16, 2018 Thank you BIGAL for the improvement. It helps me learn. Greg 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.