Hello...
I'm not a LISP expert by any means, but I was able to write this:
(defun c:3 ()
(IF (= SLOPE NIL) (SETQ SLOPE 4))
(IF (= INTER NIL) (SETQ INTER 2))
(SETQ SLP (GETREAL (STRCAT "\nEnter Slope <" (RTOS SLOPE) ">: ")))
(IF (= SLP NIL) (SETQ SLP SLOPE))
(SETQ SLOPE SLP)
(SETQ INT (GETREAL (STRCAT "\nEnter Contour Ratio <" (RTOS INTER) ">: ")))
(IF (= INT NIL) (SETQ INT INTER))
(SETQ INTER INT)
(SETQ OFF (ABS (* SLP INT)))
(SETQ DIFF INT)
(SETQ CON (ENTSEL "\nSelect Contour: "))
(REDRAW (CAR CON) 3)
(WHILE (NOT (NULL (SETQ SIDE (GETPOINT "\nPick Offset Side: "))))
(COMMAND "OFFSET" OFF CON SIDE "")
(SETQ LCON (entlast))
(SETQ CON LCON)
(COMMAND "MOVE" CON "" (LIST 0.0 0.0 DIFF) "")
(SETQ CON_ENT (ENTGET CON))
(SETQ CON_ELEV (CDR (ASSOC '38 CON_ENT)))
(PRINC "\n Last Contour Elevation: ")(PRINC CON_ELEV)(PRINC)
)
)
Can someone help me write something similar so except having it prompt the user for slope and ending elevation and having it offset until it gets to the inputted elevation? For example, starting w/ a 100 contour, prompting user for a slope, say 2 to 1, then prompting user for an elevation, say 120, the routine would the offset contours to get to 120.
Hope that makes sense. Thanks in advance !