;;; ;;; ;;; Author: ;;; Henry C. Francis ;;; 425 N. Ashe St. ;;; Southern Pines, NC 28387 ;;; ;;; http://www.paracadd.com ;;; All rights reserved. ;;; ;;; Copyright: 2006 ;;; Edited: 08-06-2012 ;;; ;;;Fixed SSGET to ignore srings consisting of only spaces. ;;;Fixes problem where blanked out associative dimensions (just a space or spaces) would default ;;;to the actual dimension if the string was made nil (1 . "") ;;; ;;;Added MULTILEADERs to the function ;;; (DEFUN C:UNSPACE () (SETQ SPACESTRS (SSGET "X" '((-4 . "") (-4 . "AND>") (-4 . "") (-4 . "AND>") (-4 . "OR>") ) ) ;_ end of SSGET ) ;_ end of SETQ (IF SPACESTRS (PROGN (SETQ SPACESTRLEN (SSLENGTH SPACESTRS) STRCNT 0 ) ;_ end of SETQ (WHILE (< STRCNT SPACESTRLEN) (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) (IF (EQ (CDR (ASSOC 0 CURRSTRENT)) "MULTILEADER") (SETQ CURRSTRENT (SUBST (CONS 304 (SUBSTR (CDR (ASSOC 304 CURRSTRENT)) 1 (1- (STRLEN (CDR (ASSOC 304 CURRSTRENT)))) ) ;_ end of SUBSTR ) ;_ end of CONS (ASSOC 304 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ (SETQ CURRSTRENT (SUBST (CONS 1 (SUBSTR (CDR (ASSOC 1 CURRSTRENT)) 1 (1- (STRLEN (CDR (ASSOC 1 CURRSTRENT)))) ) ;_ end of SUBSTR ) ;_ end of CONS (ASSOC 1 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of IF (ENTMOD CURRSTRENT) (SETQ STRCNT (1+ STRCNT)) ) ;_ end of WHILE (SETQ SPACESTRS NIL SPACESTRLEN NIL ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF (SETQ SPACESTRS (SSGET "X" '((-4 . "") (-4 . "AND>") (-4 . "") (-4 . "AND>") (-4 . "OR>") ) ) ;_ end of SSGET ) ;_ end of SETQ (IF SPACESTRS (PROGN (SETQ SPACESTRLEN (SSLENGTH SPACESTRS) STRCNT 0 ) ;_ end of SETQ (WHILE (< STRCNT SPACESTRLEN) (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) (IF (EQ (CDR (ASSOC 0 CURRSTRENT)) "MULTILEADER") (SETQ CURRSTRENT (SUBST (CONS 304 (SUBSTR (CDR (ASSOC 304 CURRSTRENT)) 2)) (ASSOC 304 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ (SETQ CURRSTRENT (SUBST (CONS 304 (SUBSTR (CDR (ASSOC 304 CURRSTRENT)) 2)) (ASSOC 304 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of IF (ENTMOD CURRSTRENT) (SETQ STRCNT (1+ STRCNT)) ) ;_ end of WHILE ) ;_ end of PROGN ) ;_ end of IF ;;; (SETQ ;;; SPACESTRS (SSGET "X" ;;; '((-4 . "") ;;; ) ;;; ) ;_ end of SSGET ;;; ) ;_ end of SETQ ;;; (IF SPACESTRS ;;; (PROGN ;;; (SETQ SPACESTRLEN ;;; (SSLENGTH SPACESTRS) ;;; STRCNT 0 ;;; ) ;_ end of SETQ ;;; (WHILE (< STRCNT SPACESTRLEN) ;;; (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) ;;; (IF (EQ (CDR (ASSOC 0 CURRSTRENT)) "MULTILEADER") ;;; (WHILE ;;; (WCMATCH (STRCASE (CDR (ASSOC 1 CURRSTRENT))) "%%U *") ;;; (SETQ CURRSTRENT ;;; (SUBST ;;; (CONS 304 ;;; (STRCAT "%%U" ;;; (SUBSTR (CDR (ASSOC 304 CURRSTRENT)) 5) ;;; ) ;_ end of STRCAT ;;; ) ;_ end of CONS ;;; (ASSOC 304 CURRSTRENT) ;;; CURRSTRENT ;;; ) ;_ end of SUBST ;;; ) ;_ end of SETQ ;;; ) ;_ end of WHILE ;;; (WHILE ;;; (WCMATCH (STRCASE (CDR (ASSOC 1 CURRSTRENT))) "%%U *") ;;; (SETQ CURRSTRENT ;;; (SUBST ;;; (CONS 1 ;;; (STRCAT "%%U" ;;; (SUBSTR (CDR (ASSOC 1 CURRSTRENT)) 5) ;;; ) ;_ end of STRCAT ;;; ) ;_ end of CONS ;;; (ASSOC 1 CURRSTRENT) ;;; CURRSTRENT ;;; ) ;_ end of SUBST ;;; ) ;_ end of SETQ ;;; ) ;_ end of WHILE ;;; ) ;_ end of IF ;;; (IF (WCMATCH (STRCASE (CDR (ASSOC 1 CURRSTRENT)) "%%U *,{\\L*}")) ;;; NIL ;;; (ENTMOD CURRSTRENT) ;;; ) ;;; (SETQ STRCNT (1+ STRCNT)) ;;; ) ;_ end of WHILE ;;; ) ;_ end of PROGN ;;; ) ;_ end of IF (SETQ SPACESTRS (SSGET "X" '((-4 . "") (-4 . "") (-4 . "") (-4 . "AND>") ) ) ;_ end of SSGET ) ;_ end of SETQ (IF SPACESTRS (PROGN (SETQ SPACESTRLEN (SSLENGTH SPACESTRS) STRCNT 0 ) ;_ end of SETQ (WHILE (< STRCNT SPACESTRLEN) (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) (IF (EQ (CDR (ASSOC 0 CURRSTRENT)) "MULTILEADER") (PROGN (PROGN (SETQ CURRSTR (CDR (ASSOC 304 CURRSTRENT))) (WHILE (WCMATCH CURRSTR "* *") (SETQ CHRCNT 1) (WHILE (NOT (WCMATCH (SUBSTR CURRSTR CHRCNT) " *")) (SETQ CHRCNT (1+ CHRCNT)) ) ;_ end of WHILE (SETQ CURRSTR (STRCAT (SUBSTR CURRSTR 1 CHRCNT) (SUBSTR CURRSTR (+ CHRCNT 2)) ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ CHRCNT (MAX 1 (1- CHRCNT))) ) ;_ end of WHILE (SETQ CURRSTRENT (SUBST (CONS 304 CURRSTR) (ASSOC 304 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of PROGN (PROGN (SETQ CURRSTR (CDR (ASSOC 1 CURRSTRENT))) (WHILE (WCMATCH CURRSTR "* *") (SETQ CHRCNT 1) (WHILE (NOT (WCMATCH (SUBSTR CURRSTR CHRCNT) " *")) (SETQ CHRCNT (1+ CHRCNT)) ) ;_ end of WHILE (SETQ CURRSTR (STRCAT (SUBSTR CURRSTR 1 CHRCNT) (SUBSTR CURRSTR (+ CHRCNT 2)) ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ CHRCNT (MAX 1 (1- CHRCNT))) ) ;_ end of WHILE (SETQ CURRSTRENT (SUBST (CONS 1 CURRSTR) (ASSOC 1 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF (ENTMOD CURRSTRENT) (SETQ STRCNT (1+ STRCNT)) ) ;_ end of WHILE ) ;_ end of PROGN ) ;_ end of IF (WHILE (SETQ SPACESTRS (SSGET "X" '( (-4 . "") (-4 . "") (-4 . "") ) ) ;_ end of SSGET ) ;_ end of SETQ (IF SPACESTRS (PROGN (SETQ SPACESTRLEN (SSLENGTH SPACESTRS) STRCNT 0 ) ;_ end of SETQ (WHILE (< STRCNT SPACESTRLEN) (IF (EQ (CDR (ASSOC 0 CURRSTRENT)) "MULTILEADER") (PROGN (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) (SETQ CURRSTR (SUBSTR (CDR (ASSOC 304 CURRSTRENT)) 2)) (SETQ CURRSTRENT (SUBST (CONS 304 CURRSTR) (ASSOC 304 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of PROGN (PROGN (SETQ CURRSTRENT (ENTGET (SSNAME SPACESTRS STRCNT))) (SETQ CURRSTR (SUBSTR (CDR (ASSOC 1 CURRSTRENT)) 2)) (SETQ CURRSTRENT (SUBST (CONS 1 CURRSTR) (ASSOC 1 CURRSTRENT) CURRSTRENT ) ;_ end of SUBST ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF (ENTMOD CURRSTRENT) (SETQ STRCNT (1+ STRCNT)) ) ;_ end of WHILE ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of WHILE (PRINC) ) ;_ end of DEFUN ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ;*** DO NOT add text below the comment! ***|;