JovanG Posted January 25, 2021 Posted January 25, 2021 Hello Every one. I would like to have a lisp that helps me to select only the polilines that have a lineweight greater than or equal to 0.5 in my current selection. If you can help me, I would really appreciate your help. Wish you a good day. Quote
Tharwat Posted January 25, 2021 Posted January 25, 2021 (ssget '((0 . "LWPOLYLINE") (-4 . ">") (370 . 0))) Quote
JovanG Posted January 25, 2021 Author Posted January 25, 2021 2 hours ago, Tharwat said: (ssget '((0 . "LWPOLYLINE") (-4 . ">") (370 . 0))) Hi Tharwat, I really thank you for your help. But (I don´t know why) in this dwg it doesn`t work well at all, because: 1. Select some objects with lineweight = 0.7 but some others with same lineweight not 2. Apparently select all but LW different of cero (not in all cases like I said in first point), but I need just greater than 0.5 And Can you help me please with a piece of code that helps me to run the program with already selected objects. I'll add the dwg shown in the image. this is the code that I use according to yours: (defun c:aux (/ ss) (sssetfirst nil (setq ss (ssget '((0 . "LWPOLYLINE") (-4 . ">") (370 . 0)))))) Thank you in advance. P-ALC-600-458_03_PR.dwg Quote
Tharwat Posted January 25, 2021 Posted January 25, 2021 5 minutes ago, JovanG said: Hi Tharwat, I really thank you for your help. But (I don´t know why) in this dwg it doesn`t work well at all, because: 1. Select some objects with lineweight = 0.7 but some others with same lineweight not 2. Apparently select all but LW different of cero (not in all cases like I said in first point), but I need just greater than 0.5 The codes allow you select LWpolylines that are above zero which means that the 0.5 is already included into account as you mentioned into your first post ' greater than or equal to 0.5' If you want to exclude the 0.5 line weight then just change (370 . 0) to (370 . 5) Quote
JovanG Posted January 25, 2021 Author Posted January 25, 2021 15 minutes ago, Tharwat said: The codes allow you select LWpolylines that are above zero which means that the 0.5 is already included into account as you mentioned into your first post ' greater than or equal to 0.5' If you want to exclude the 0.5 line weight then just change (370 . 0) to (370 . 5) Oh yeah. I´m sorry, greater than or equal to 0.5, but what I mean is that program don´t run well at all becase happen something like this: Pline enclosed in red has a lineweight of 0.4 and the one enclosed in blue too, but red is selected and blue not. Why does it happen? Quote
Tharwat Posted January 25, 2021 Posted January 25, 2021 All red rectangles are on 0.0 line weight as show in the following snapshot. If you changed the GC (370 . 0) to (370 . 5) then that means only the lwpolylines that are on line weight that greater than zero would be selected Quote
Tharwat Posted January 25, 2021 Posted January 25, 2021 I forgot to say also is that the red rectangles are a combination of line objects and are not LWpolyline objects. 1 Quote
JovanG Posted January 25, 2021 Author Posted January 25, 2021 (edited) 17 minutes ago, Tharwat said: I forgot to say also is that the red rectangles are a combination of line objects and are not LWpolyline objects. Oh, That´s why. Line objects are not included and there are some line objects in my selection. I Really thank you Tharwat Edited January 25, 2021 by JovanG Quote
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.