@jakepV2M3V
Here you have another lisp that you can use when your terrain isohypses are all placed in drawing with
elevations set to 0. This is a problem that I encounter way too often in my daily practice.
(defun c:repelev ( / *error* base step eo ss i)
(defun *error* ()
(princ)
)
(setq base (getreal"\n New starting elevation: >")
step (getreal "\n Isohypse step (+ or - value) >:")
)
(entmakex
(list (cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 "C-X-Topo-Major")
(cons 62 1)
(cons 70 0)
(cons 370 30)
)
)
(entmakex
(list (cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 "C-X-Topo-Minor")
(cons 62 5)
(cons 70 0)
(cons 370 18)
)
)
(princ (strcat "\nSelect isohypse(s) at " (rtos base 2 1) " Press 'Enter' when done): >"))
(while (and (setq ss (ssget '((0 . "*POLYLINE")))) (> (sslength ss) 0))
(setq i -1)
(while (< (setq i (1+ i)) (sslength ss))
(setq eo (vlax-ename->vla-object (ssname ss i)))
(vlax-put eo 'Elevation base)
(if (= (rem base 5) 0.0)
(vlax-put eo 'Layer "C-X-Topo-Major")
(vlax-put eo 'Layer "C-X-Topo-Minor")
)
)
(setq base (+ base step))
(princ (strcat "\nSelect isohypse(s) at " (rtos base 2 1) " Press 'Enter' when done): >"))
)
(princ)
)
Miljenko Hatlak

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.