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