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
759 Views, 10 Replies

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

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

DumR0
Advocate
Advocate

Hi,

 

Do you mean polyline with line weight 0.25mm?

drop some .dwg

0 Likes

Hi,

 

Do you mean polyline with line weight 0.25mm?

drop some .dwg

Message 3 of 11

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

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

DumR0
Advocate
Advocate

Dumitrurobu4BPMD_0-1656310486963.png

 

try find command, check boxes for atribut

0 Likes

Dumitrurobu4BPMD_0-1656310486963.png

 

try find command, check boxes for atribut

Message 5 of 11

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

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

DumR0
Advocate
Advocate
0 Likes

Message 7 of 11

В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.

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

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

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

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

 

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

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

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

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

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