Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selecting all lines from same layer that have the same suffix

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
marius.lechtenboehmer
842 Views, 10 Replies

Selecting all lines from same layer that have the same suffix

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.

10 REPLIES 10
Message 2 of 11

Hi,

 

Do you mean polyline with line weight 0.25mm?

drop some .dwg

Message 3 of 11

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".
Message 4 of 11

Dumitrurobu4BPMD_0-1656310486963.png

 

try find command, check boxes for atribut

Message 5 of 11

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

mariuslechtenboehmer_0-1656311348285.png

 

Message 6 of 11

Message 7 of 11

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.

Message 8 of 11

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.

Message 9 of 11

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)
  )

 

Message 10 of 11

That is awesome! Thanks a lot. Works like a charm.
Message 11 of 11

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report