;;;Moves plan & profile labels (tags) generated by GPDGN (does not require GPDGN) ;;; ;;; ;;; ;;; ;;; ;;; Requires: upoint.lsp ;;; ;;;**************************************************************************** ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 3-3-2006 ;;;> EDITED: 07-20-2006 ;;; (DEFUN c:adjtag () (COMMAND ".undo" "m") (SETQ tagss (SSGET '((-4 . "")) ) ;_ end of SSGET ) ;_ end of SETQ (SETQ tagcnt 0) (IF upoint NIL (LOAD "upoint" "\nFile UPOINT.LSP not loaded! ")) (SETQ base_pt (upoint 1 "" "Pick base point for relocation" nil nil)) (SETQ newbase_pt (upoint 1 "" "Pick new location" nil base_pt)) (SETQ off_dist (DISTANCE newbase_pt base_pt) off_ang (ANGLE base_pt newbase_pt) ) ;_ end of SETQ (SETQ tagcnt 0) (WHILE (< tagcnt (SSLENGTH tagss)) (SETQ tagent (ENTGET (SSNAME tagss tagcnt))) (COND ((EQ (CDR (ASSOC 0 tagent)) "TEXT") (SETQ tagent (SUBST (CONS 10 (POLAR (CDR (ASSOC 10 tagent)) off_ang off_dist) ) ;_ end of CONS (ASSOC 10 tagent) tagent ) ;_ end of SUBST ) ;_ end of SETQ (SETQ tagent (SUBST (CONS 11 (POLAR (CDR (ASSOC 11 tagent)) off_ang off_dist) ) ;_ end of CONS (ASSOC 11 tagent) tagent ) ;_ end of SUBST ) ;_ end of SETQ (ENTMOD tagent) ) ((EQ (CDR (ASSOC 0 tagent)) "POLYLINE") (SETQ plhead_ent tagent) (SETQ vrtxcnt 1) (WHILE (AND (ENTNEXT (CDR (ASSOC -1 tagent))) (SETQ vrtxent (ENTGET (ENTNEXT (CDR (ASSOC -1 tagent))))) (NOT (EQ (CDR (ASSOC 0 vrtxent)) "SEQEND")) ) ;_ end of AND (IF (> vrtxcnt (IF (AND viewno (> viewno 1)) 1 2 ) ;_ end of IF ) ;_ end of > (PROGN (SETQ vrtxent (SUBST (CONS 10 (POLAR (CDR (ASSOC 10 vrtxent)) off_ang off_dist ) ;_ end of POLAR ) ;_ end of CONS (ASSOC 10 vrtxent) vrtxent ) ;_ end of SUBST ) ;_ end of SETQ (ENTMOD vrtxent) ) ;_ end of progn ) ;_ end of if (SETQ vrtxcnt (1+ vrtxcnt)) (SETQ tagent vrtxent) ) ;_ end of while (ENTMOD plhead_ent) ) ) ;_ end of COND (SETQ tagcnt (1+ tagcnt)) ) ;_ end of WHILE ) ;_ end of defun ;;;******************************************************************** ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 1 nil nil nil T) ;*** DO NOT add text below the comment! ***|;