Dhammike Posted April 26, 2020 Share Posted April 26, 2020 (setq x ptlst) (setq lst(mapcar '(lambda ( x ) (read (strcat "(" (vl-string-translate "," " " x) ")"))) lst)) (princ lst) (setq ss4 (ssget "_WP" lst (list (cons 0 "*Text")))) (setq i (1 - i)) (setq en (ssname ss2 (setq k (1 + k)))) (setq ent (entget en)) I used above code and i got below results. ("426982.418,511619.699" "426974.535,511603.142" "426964.041,511609.123" "426954.742,511612.095" "426946.029,511615.082" "426950.240,511625.283" "426955.404,511635.795" "426959.956,511644.578" "426970.869,511642.286" "426979.196,511640.264" "426985.400,511638.352" "426990.116,511635.794") nil nil nil ; error: too many arguments _$ Still my problem not solved. thank you for helping me. I am waiting for your answer. Quote Link to comment Share on other sites More sharing options...
Dhammike Posted April 26, 2020 Share Posted April 26, 2020 (setq ss4 (ssget "_WP" PTLST1 '((8 . "TEXT-PN")) ) I -1) (SETQ SSLEN(SSLENGTH SS4)) (setq en (ssname ss4 (setq i (1+ i)))) (setq ent (entget en)) i used above code and got answer. Thank you very much. But "_WP" select objects completely inside the polygon. if part of text out side the polygon will not select. (eg. 203, 206 numbers). How can i select all text withn polygon, if insertion point of the text is within the polygon. Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted April 26, 2020 Share Posted April 26, 2020 Use "_CP" instead. Quote Link to comment Share on other sites More sharing options...
Dhammike Posted April 27, 2020 Share Posted April 27, 2020 (edited) Thank you verymuch JONATHAN. "_CP" is working. Thanks again to You and LEE MAC. Edited April 27, 2020 by Dhammike Quote Link to comment Share on other sites More sharing options...
Ashe Posted August 12, 2022 Share Posted August 12, 2022 Hello! I know this is an old topic but I've got a problem I'm trying to solve. the action I'm trying to perform is generally the same as the OP's question. I have a polygonal PLINE and I want to select only the sections of PLINEs and other objects that are within that polygon. I've tried using Alan's original LISP from earlier in this thread and did a bunch of research on how to execute LISPs, but I can't seem to get it to work for me. I figured maybe it's not working because the software has changed so much since that code was originally written, but I don't know enough about LISPs to be able to fix it myself. It may also be that it's not broken and I just don't know what I'm doing (I'm very new to AutoCAD, I use it for work and we just transitioned to it recently), but any help would be appreciated. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
3dwannab Posted April 5, 2023 Share Posted April 5, 2023 On 3/31/2011 at 8:04 PM, alanjt said: Here's one that will do both,... Hi Alan, thanks for this. I get this error. "; error: AutoCAD.Application: Not applicable" when choosing the crossing method. Tried to find the issue but couldn't. 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.