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

Mline unique selection

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
597 Views, 5 Replies

Mline unique selection

Anonymous
Not applicable

I just imported thousands of contours from a local municipality. Is there a method to select contours at every 5 feet (ala 5', 10', 15'...etc.)? I need to have major (5') contours on a different layer (lighweight). It will take forever selecting each 5' mline.

 

BTW, using AutoCAD 2014

 

Thanks

 

 

0 Likes

Mline unique selection

I just imported thousands of contours from a local municipality. Is there a method to select contours at every 5 feet (ala 5', 10', 15'...etc.)? I need to have major (5') contours on a different layer (lighweight). It will take forever selecting each 5' mline.

 

BTW, using AutoCAD 2014

 

Thanks

 

 

5 REPLIES 5
Message 2 of 6
sthompson1021
in reply to: Anonymous

sthompson1021
Advisor
Advisor

 Do the contour lines have a Z elevation attached to them? If so you might be able to isolate them using QSELECT. Are they true MLINE's ?

0 Likes

 Do the contour lines have a Z elevation attached to them? If so you might be able to isolate them using QSELECT. Are they true MLINE's ?

Message 3 of 6
Patchy
in reply to: Anonymous

Patchy
Mentor
Mentor

Try Qselect or use Front View and select by crossing them.

0 Likes

Try Qselect or use Front View and select by crossing them.

Message 4 of 6
Anonymous
in reply to: sthompson1021

Anonymous
Not applicable
They are multilines with z elevations, but they are not true 3D mlines.
Qselect does not give you the option to isolate by elevation.
Any other ideas?
0 Likes

They are multilines with z elevations, but they are not true 3D mlines.
Qselect does not give you the option to isolate by elevation.
Any other ideas?
Message 5 of 6
Kent1Cooper
in reply to: Anonymous

Kent1Cooper
Consultant
Consultant

On the assumption that they're really Polylines [it's hard to imagine using MultiLines for contours, but change the entity type below to whatever they really are], and that they have 3D elevation, here's one way [lightly tested]:

 

(if (setq contourss (ssget "_X" '((0 . "*POLYLINE") (8 . "YourContourLayerName"))))

  (foreach contour (mapcar 'cadr (ssnamex contourss)); selection set to list

    (if (equal (rem (cdr (assoc 38 (entget contour))) 60.0) 0.0 1e-6); five-foot-multiple elevation

      (command "_.chprop" contour "" "_layer" "YourFiveFootMultipleContoursLayerName" "")
    ); if

  ); foreach

); if

 

EDIT:  Sorry -- that won't work for Mlines [they don't store their elevation as Polylines do].  If they're level, try this substitution:

 

(if (setq contourss (ssget "_X" '((0 . "MLINE") (8 . "YourContourLayerName"))))

....

    (if (equal (rem (cadddr (assoc 10 (entget contour))) 60.0) 0.0 1e-6); five-foot-multiple elevation

....

Kent Cooper, AIA
0 Likes

On the assumption that they're really Polylines [it's hard to imagine using MultiLines for contours, but change the entity type below to whatever they really are], and that they have 3D elevation, here's one way [lightly tested]:

 

(if (setq contourss (ssget "_X" '((0 . "*POLYLINE") (8 . "YourContourLayerName"))))

  (foreach contour (mapcar 'cadr (ssnamex contourss)); selection set to list

    (if (equal (rem (cdr (assoc 38 (entget contour))) 60.0) 0.0 1e-6); five-foot-multiple elevation

      (command "_.chprop" contour "" "_layer" "YourFiveFootMultipleContoursLayerName" "")
    ); if

  ); foreach

); if

 

EDIT:  Sorry -- that won't work for Mlines [they don't store their elevation as Polylines do].  If they're level, try this substitution:

 

(if (setq contourss (ssget "_X" '((0 . "MLINE") (8 . "YourContourLayerName"))))

....

    (if (equal (rem (cadddr (assoc 10 (entget contour))) 60.0) 0.0 1e-6); five-foot-multiple elevation

....

Kent Cooper, AIA
Message 6 of 6
hgasty1001
in reply to: Anonymous

hgasty1001
Advisor
Advisor

Hi,

 

If the drawing was generated in Autocad Map, the contour lines could be mpolygons, can you post the result of this? : (cdr (assoc 0 (entget (car (entsel)))))

 

Gaston Nunez

0 Likes

Hi,

 

If the drawing was generated in Autocad Map, the contour lines could be mpolygons, can you post the result of this? : (cdr (assoc 0 (entget (car (entsel)))))

 

Gaston Nunez

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