Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Selecting all lines from same layer that have the same suffix

marius.lechtenboehmer
Participant

Selecting all lines from same layer that have the same suffix

marius.lechtenboehmer
Participant
Participant

I have contour lines (polylines) with a precision of 0.25m. So 1.00m, 1.25m, 1.5m, 1.75m, 2.00m, 2.25m etc. They are all on the same layer. I want to select all the lines that have the suffix .00m (1.00m, 2.00m, etc.). How do I do that?

Using the quickselect feature and writing "*.00" doesn't work.

0 Likes
Reply
Accepted solutions (1)
926 Views
10 Replies
Replies (10)

DumR0
Advocate
Advocate

Hi,

 

Do you mean polyline with line weight 0.25mm?

drop some .dwg

0 Likes

marius.lechtenboehmer
Participant
Participant
No. All lines have an attribute names "height". I want to select all lines from the same layer that end with .00 on the attribute "height".
0 Likes

DumR0
Advocate
Advocate

Dumitrurobu4BPMD_0-1656310486963.png

 

try find command, check boxes for atribut

0 Likes

marius.lechtenboehmer
Participant
Participant

Doesn't work. The polylines are neither blocks nor text. In the screenshot it is the attribute "Erhebung".

mariuslechtenboehmer_0-1656311348285.png

 

0 Likes

DumR0
Advocate
Advocate
0 Likes

ВeekeeCZ
Consultant
Consultant

It's "Elevation" in English. And it cannot be done using built-in features.

If you post some sample dwg I could do some quick lisp.

marius.lechtenboehmer
Participant
Participant

Here's a sample of the data. A lisp would be amazing!

I also have AutoCAD Map3D available but I guess that won't help me.

0 Likes

ВeekeeCZ
Consultant
Consultant
Accepted solution

I don't know MAP, but C3D will definitely helps since you can set styles that differentiate contours (eg by layer)

 

(defun c:SelectContoursbyElevation ( / m s r i e)
  
  (if (and (or (and (ssget "_I")
		    (sssetfirst nil)
		    (setq s (ssget "_P" '((0 . "LWPOLYLINE")))))
	       (setq s (ssget '((0 . "LWPOLYLINE")))))
	   (setq r (getreal "\nRemainder after division 1: "))
	   )
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i))))
      (if (not (equal (rem (cdr (assoc 38 (entget e))) 1) r 1e-9))
	(ssdel e s))))
  (sssetfirst nil s)
  (princ)
  )

 

marius.lechtenboehmer
Participant
Participant
That is awesome! Thanks a lot. Works like a charm.
0 Likes

3wood
Advisor
Advisor

You can also try ELEVLAYER.

It puts objects at certain elevation to a specific layer. Then you can use layer filter to handle them in groups.

ELEVLAYER.gif

0 Likes