;;;NEWZ: Set "Z"; MATZ: match "Z"; SHOWZ Display "Z"; OFFZ Set "Z" +- reference "Z" ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 1-26-96 ;;;> EDITED: 04-12-2006 ;;; (defun c:stepz (/ ss 10a 10b 11a 11b) (if ureal nil (load "ureal" "\nFile UREAL.LSP not loaded! ")) (if ukword nil (load "ukword" "\nFile UKWORD.LSP not loaded! ")) (setq ss (ssget) newsz (ureal 1 "" "\nEnter starting z elevation" (if newsz newsz 0)) stepz (ureal 1 "" "\nEnter z elevation increment" (if stepz stepz 1)) mkcontr (ukword 1 "Yes No" "\nMake contour layers?" (if mkcontr mkcontr "Yes")) sslen (sslength ss) count 0 ) ;_ end of setq (while (not (eq count sslen)) (setq ent1 (entget (ssname ss count)) 10a (assoc 10 ent1) 10b (list (car 10a) (cadr 10a) (caddr 10a) newsz) 11a (assoc 11 ent1) 11b (list (car 11a) (cadr 11a) (caddr 11a) newsz) plz (strcat "0,0," (if(>(length 10a )3)(rtos (- newsz (cadddr 10a)))(rtos newsz))) ) ;_ end of setq (IF (EQ mkcontr "Yes") (SETQ cntourlay (COND ((EQ(STRCASE(DOS_USERNAME))"GRACKL"); special circumstance for G. Rackl (SETQ cntourlay "Correct Elev Contours")) ((EQ(REM newsz 10)0) (IF do_cmud (SETQ cntourlay "C-TOPO3CN10") (SETQ cntourlay "C-TOPO2CN10") )) ((EQ(REM newsz 5)0) (IF do_cmud (SETQ cntourlay "C-TOPO3CN05") (SETQ cntourlay "C-TOPO2CN05") )) ((EQ(REM newsz 2)0) (IF do_cmud (SETQ cntourlay "C-TOPO2CN02") (SETQ cntourlay "C-TOPO4CN02") )) ((OR(EQ(REM newsz 1)0)(EQ(REM newsz 0.5)0)) (IF do_cmud (SETQ cntourlay "C-TOPO2CN01") (SETQ cntourlay "C-TOPO4CN01") )) (T NIL) ) ) ) (cond ((eq (cdr (assoc 0 ent1)) "INSERT") (setq ent1 (subst 10b 10a ent1)) ) ;;; ((or(eq (cdr (assoc 0 ent1)) "POLYLINE")(eq (cdr (assoc 0 ent1)) "ELLIPSE")) ;;; (command ".move" (cdr (assoc -1 ent1)) "" plz "") ;;; (if (and (eq mkcontr "Yes") cntourlay) ;;; (command ".change" (cdr (assoc -1 ent1)) "" "p" "la" cntourlay) ;;; ) ;;; ) ((eq (cdr (assoc 0 ent1)) "LWPOLYLINE") (setq ent1 (subst (cons 38 newsz)(assoc 38 ent1) ent1)) (if (and(eq mkcontr "Yes")(assoc 8 ent1)cntourlay) (setq ent1 (subst (cons 8 cntourlay)(assoc 8 ent1) ent1)) (IF(AND(EQ mkcontr "Yes")cntourlay) (SETQ ent1 (append ent1 (list(cons 8 cntourlay)))) ) )) ((and (assoc 12 ent1) (assoc 13 ent1)) (setq 12a (assoc 12 ent1) 13a (assoc 13 ent1) 12b (list (car 12a) (cadr 12a) (caddr 12a) newsz) 13b (list (car 13a) (cadr 13a) (caddr 13a) newsz) ent1 (subst 10b 10a ent1) ent1 (subst 11b 11a ent1) ent1 (subst 12b 12a ent1) ent1 (subst 13b 13a ent1) ; ent1 (subst (cons 62 256) (assoc 62 ent1) ent1) ) ;_ end of setq ) ((and (assoc 10 ent1) (assoc 11 ent1)) (setq 11a (assoc 11 ent1) 11b (list (car 11a) (cadr 11a) (caddr 11a) newsz) ent1 (subst 10b 10a ent1) ent1 (subst 11b 11a ent1) ; ent1 (subst (cons 62 256) (assoc 62 ent1) ent1) ) ;_ end of setq ) ((assoc 10 ent1) (setq ent1 (subst 10b 10a ent1) ; ent1 (subst (cons 62 256) (assoc 62 ent1) ent1) ) ;_ end of setq ) ) ;_ end of cond (progn (if (/= (assoc 210 ent1) (cons 210 (list 0 0 0))) (setq ent1 (subst (cons 210 (list 0 0 0)) (assoc 210 ent1) ent1) ) ;_ end of setq ) ;_ end of if (IF (AND(EQ mkcontr "Yes")cntourlay(ASSOC 8 ent1)) (SETQ ent1 (subst (cons 8 cntourlay)(assoc 8 ent1) ent1)) (IF(AND(EQ mkcontr "Yes")cntourlay) (SETQ ent1 (append ent1 (list(cons 8 cntourlay)))) ) ) ; (if (eq (cdr (assoc 0 ent1)) "POLYLINE") ; nil (entmod ent1) ; ) ;_ end of if ) ;_ end of progn (setq count (1+ count)) (setq newsz (+ newsz stepz)) ) ;_ end of while (command "_.move" ss "" (LIST 0 0 0) "") (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 0 0 0 T T nil T) ***Don't add text below the comment!***|;