;;;Creates 3D breakline between selected AECC_POINT objects ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 12/15/2004 ;;;> EDITED: 05-25-2005 ;;; (DEFUN gradebreak_error (msg /) (SETVAR "osmode" old_osmode) (SETQ *error* (IF old_error old_error NIL ) ;_ end of IF ) ;_ end of SETQ (SETQ ent_10x NIL ent_10y NIL ent_10z NIL ent_11x NIL ent_11y NIL ent_11z NIL ) ;_ end of SETQ (PRINC "\n") (PRINC msg) (PRINC) ) ;_ end of defun (DEFUN c:gradebreak () (SETQ old_osmode (GETVAR "osmode")) (SETVAR "osmode" 9) (SETQ old_error *error*) (SETQ *error* gradebreak_error) (IF (AND ustr ureal uint ukword) NIL (LOAD "uutils" "\nFile UUTILS.LSP not loaded") ) ;_ end of IF (WHILE (SETQ line_ent (NENTSEL (STRCAT "\nSelect AECC_POINT: ") ) ;_ end of ENTSEL ) ;_ end of SETQ (SETQ ent_data (ENTGET (CAR line_ent))) (SETQ ent_pt (CADR line_ent)) (SETQ ent_pt (LIST (CAR ent_pt) (CADR ent_pt) 0)) (COND ((EQ (CDR (ASSOC 0 ent_data)) "AECC_POINT") (SETQ ent_10x (CADR (ASSOC 11 ent_data))) (SETQ ent_10y (CADDR (ASSOC 11 ent_data))) (SETQ ent_302 (CDR (ASSOC 302 ent_data))) (SETQ ent_303 (CDR (ASSOC 303 ent_data))) (SETQ el_adj_val 0) (cond ((or(wcmatch ent_302 "*-[0-9].[0-9]") (wcmatch ent_302 "*-[0-9].[0-9][0-9]") (wcmatch ent_302 "*-[0-9].[0-9] *") (wcmatch ent_302 "*-[0-9].[0-9][0-9] *") ) (PRINC (STRCAT " " ent_302 " ")) (PRINC) (setq defadjcnt 1) (while (or(wcmatch (substr ent_302 defadjcnt) "*-[0-9].[0-9]") (wcmatch (substr ent_302 defadjcnt) "*-[0-9].[0-9][0-9]") (wcmatch (substr ent_302 defadjcnt) "*-[0-9].[0-9] *") (wcmatch (substr ent_302 defadjcnt) "*-[0-9].[0-9][0-9] *") ) (setq defadjcnt (1+ defadjcnt)) ) (setq def_adj_val (read (substr ent_302 (1- defadjcnt)))) (setq el_adj_val (ureal 1 "" "Enter vertical offset for this point" def_adj_val)) (SETQ ent_10z (+ el_adj_val (CADDDR (ASSOC 11 ent_data)))) ) ((or(wcmatch ent_303 "*-[0-9].[0-9]") (wcmatch ent_303 "*-[0-9].[0-9][0-9]") (wcmatch ent_303 "*-[0-9].[0-9] *") (wcmatch ent_303 "*-[0-9].[0-9][0-9] *") ) (PRINC (STRCAT " " ent_303 " ")) (PRINC) (setq defadjcnt 1) (while (or(wcmatch (substr ent_303 defadjcnt) "*-[0-9].[0-9]") (wcmatch (substr ent_303 defadjcnt) "*-[0-9].[0-9][0-9]") (wcmatch (substr ent_303 defadjcnt) "*-[0-9].[0-9] *") (wcmatch (substr ent_303 defadjcnt) "*-[0-9].[0-9][0-9] *") ) (setq defadjcnt (1+ defadjcnt)) ) (setq def_adj_val (read (substr ent_303 (1- defadjcnt)))) (setq el_adj_val (ureal 1 "" "Enter vertical offset for this point" def_adj_val)) (SETQ ent_10z (+ el_adj_val (CADDDR (ASSOC 11 ent_data)))) ) (T (PRINC (STRCAT " " ent_302 " ")) (PRINC) (SETQ ent_10z (CADDDR (ASSOC 11 ent_data))) ) ) (SETQ next_pnt NIL) (WHILE (OR (NOT next_pnt) (NOT (EQ (CDR (ASSOC 0 next_data)) "AECC_POINT"))) (SETQ next_pnt (NENTSEL "\nSelect point at other end of line to draw: ")) (IF next_pnt (SETQ next_data (ENTGET (CAR next_pnt))) ) ;_ end of IF ) ;_ end of WHILE (SETQ nent_pt (CADR next_pnt)) (SETQ nent_pt (LIST (CAR nent_pt) (CADR nent_pt) 0)) (SETQ ent_11x (CADR (ASSOC 11 next_data))) (SETQ ent_11y (CADDR (ASSOC 11 next_data))) (SETQ ent_11z (CADDDR (ASSOC 11 next_data))) (SETQ nent_302 (CDR (ASSOC 302 next_data))) (SETQ nent_303 (CDR (ASSOC 303 next_data))) (SETQ el_adj_val 0) (cond ((or(wcmatch nent_302 "*-[0-9].[0-9]") (wcmatch nent_302 "*-[0-9].[0-9][0-9]") (wcmatch nent_302 "*-[0-9].[0-9] *") (wcmatch nent_302 "*-[0-9].[0-9][0-9] *") ) (PRINC (STRCAT " " nent_302 " ")) (PRINC) (setq defadjcnt 1) (while (or(wcmatch (substr nent_302 defadjcnt) "*-[0-9].[0-9]") (wcmatch (substr nent_302 defadjcnt) "*-[0-9].[0-9][0-9]") (wcmatch (substr nent_302 defadjcnt) "*-[0-9].[0-9] *") (wcmatch (substr nent_302 defadjcnt) "*-[0-9].[0-9][0-9] *") ) (setq defadjcnt (1+ defadjcnt)) ) (setq def_adj_val (read (substr nent_302 (1- defadjcnt)))) (setq el_adj_val (ureal 1 "" "Enter vertical offset for this point" def_adj_val)) (SETQ ent_11z (+ el_adj_val (CADDDR (ASSOC 11 next_data)))) ) ((or(wcmatch nent_303 "*-[0-9].[0-9]") (wcmatch nent_303 "*-[0-9].[0-9][0-9]") (wcmatch nent_303 "*-[0-9].[0-9] *") (wcmatch nent_303 "*-[0-9].[0-9][0-9] *") ) (PRINC (STRCAT " " nent_303 " ")) (PRINC) (setq defadjcnt 1) (while (or(wcmatch (substr nent_303 defadjcnt) "*-[0-9].[0-9]") (wcmatch (substr nent_303 defadjcnt) "*-[0-9].[0-9][0-9]") (wcmatch (substr nent_303 defadjcnt) "*-[0-9].[0-9] *") (wcmatch (substr nent_303 defadjcnt) "*-[0-9].[0-9][0-9] *") ) (setq defadjcnt (1+ defadjcnt)) ) (setq def_adj_val (read (substr nent_303 (1- defadjcnt)))) (setq el_adj_val (ureal 1 "" "Enter vertical offset for this point" def_adj_val)) (SETQ ent_11z (+ el_adj_val (CADDDR (ASSOC 11 next_data)))) ) (T (PRINC (STRCAT " " nent_302 " ")) (PRINC) (SETQ ent_11z (CADDDR (ASSOC 11 next_data))) ) ) ) ) ;_ end of COND (SETQ ent_lay (CDR (ASSOC 8 ent_data))) (SETQ clayr ent_lay) (IF (EQ (CDR (ASSOC 0 ent_data)) "AECC_POINT") (PROGN (IF (AND ent_10x ent_10y ent_10z ent_11x ent_11y ent_11z (NOT (AND (EQ ent_10x ent_11x)(EQ ent_10y ent_11y)(EQ ent_10z ent_11z)))) (PROGN (SETQ line_ent (LIST (CONS 0 "LINE") (CONS 10 (LIST ent_10x ent_10y ent_10z)) (CONS 11 (LIST ent_11x ent_11y ent_11z)) (CONS 8 (IF (EQ (GETVAR "loginname") "cfrancis") "BREAKLINE" (GETVAR "CLAYER"))) (CONS 62 256) ) ;_ end of LIST ) ;_ end of SETQ (ENTMAKE line_ent) ;;; (IF ltstr ;;; (COMMAND ".layer" "c" colr ent_layer "lt" ltstr ent_layer "") ;;; (COMMAND ".layer" "c" colr ent_layer "") ;;; ) ;_ end of IF (SETQ ent_10x NIL ent_10y NIL ent_10z NIL ent_11x NIL ent_11y NIL ent_11z NIL ;;; ent_layer NIL ) ;_ end of SETQ ) ;_ end of PROGN (IF (AND (EQ ent_10x ent_11x)(EQ ent_10y ent_11y)(EQ ent_10z ent_11z)) (PROGN (PRINC "\nThe same point was picked for both endpoints! ") (PRINC) ) ) ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (IF (EQ (CDR (ASSOC 0 ent_data)) "LINE") (PROGN (REDRAW) ) ;_ end of progn ) ;_ end of if ) ;_ end of while (SETQ *error* old_error) (SETVAR "osmode" old_osmode) ) ;_ end of DEFUN (setq c:gbrk c:gradebreak) (PRINC) ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil T T) ***Don't add text below the comment!***|;