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
419 Views, 5 Replies

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

 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

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

Message 4 of 6
Anonymous
in reply to: sthompson1021

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

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

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  

Autodesk Design & Make Report

”Boost