;;;    AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;;    AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;;    MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
;;;    DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;;    UNINTERRUPTED OR ERROR FREE.

;;;    This programe rotate a selection of blocks around their insertion point
;;;    command defined : CHELEV
;;;    Author : Nicolas Menu

(defun C:chelev (/ ss1 elev interval a pt1 pt2 ename) 
(command "_LINE" (setq pt1(getpoint "Start der Referenzlinie - Tiefpunkt")) (setq pt2(getpoint " Ende der Referenzlinie - Hochpunkt")) "")

(setq ss1 (ssdel (entlast) (ssget "_F" (list pt1 pt2 ))))
(setq elev (getreal "\nStarthöhe : "))
(setq interval (getreal "\nIntervall : "))

(setq a 0)
(while (<= a (- (sslength ss1) 1))
  (progn
    (setq ename (ssname ss1 a))
    (command "_CHANGE" ename "" "EI" "ER" elev "")
    (setq a (+ a 1))
    (setq elev (+ elev interval))
  )
)
(princ)
)