;;;Layer macros ;;;"GOF" "GON" "PGOF" "PGON" "GROF" "GRON" "PTOF" PTON" "PTFRX" "PTTHW" "TOPON" "TOPOF" ;;;"WDLNOF" "WDLNON" "WDON" "WDOF" "XRON" "XROF" "SVOF" "SVON" "PATOF" "PATON" "RWOF" ;;;"EASOF" "EPOF" "TPOF" "EXOF" "TXTOF" "INSOF" "EROF" "CTOF" "PPOF" "HDOF" "AOF" "AON" ;;;"RWON" "EASON" "EPON" "TPON" "EXON" "TXTON" "INSON" "ERON" "CTON" "PPON" "HDON" ;;;"ALTON" "ALTOF" "ISOALT" "VLOCK" ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-26-95 ;;;> EDITED: 06-20-2006 ;;; (DEFUN chkcurlayoff (laymatch_str act/) (SETQ laymatch_lst nilhim strcnt 1 strstart 1 ) (WHILE (< strcnt (STRLEN laymatch_str)) (WHILE (AND (<= strcnt (STRLEN laymatch_str)) (NOT (WCMATCH (SUBSTR laymatch_str strcnt 1) "`,"))) (SETQ strcnt (1+ strcnt)) ) (SETQ substr_cnt (- strcnt strstart)) (SETQ laymatch_lst (APPEND laymatch_lst (LIST (SUBSTR laymatch_str strstart substr_cnt)))) (SETQ strstart (1+ strcnt) strcnt (1+ strcnt) ) ) (SETQ cur_layname (GETVAR "clayer")) (FOREACH n laymatch_lst (IF (AND (WCMATCH (STRCASE cur_layname)(STRCASE n))(OR (EQ act "freeze")(EQ act "off"))) (IF (AND (EQ (CDR (ASSOC 70(SETQ zero_def (TBLSEARCH "layer" "0")))) 0) (> (CDR (ASSOC 62 zero_def)) 0) ) (COMMAND ".layer" "s" "0" "") (PROGN (IF (NOT (EQ (CDR (ASSOC 70 zero_def)) 0)) (COMMAND ".layer" "thaw" "0" "") ) (IF (<= (CDR (ASSOC 62 zero_def)) 0) (COMMAND ".layer" "on" "0" "") ) (COMMAND ".layer" "s" "0" "") ) ) ) ) (PRINC) ) (DEFUN c:vlock () (setq it(ssget "X" '((0 . "VIEWPORT")))) (setq ite (entget (ssname it 0))) (COND ((EQ (boole 1 16384 (cdr(assoc 90 ite))) 16384) (COMMAND ".mview" "lo" "off" "all" "") (SETQ vlkstat "OFF") (PRINC "\nAll viewports are unlocked! ") ) ((NOT(EQ (boole 1 16384 (cdr(assoc 90 ite))) 16384)) (COMMAND ".mview" "lo" "on" "all" "") (SETQ vlkstat "ON") (PRINC "\nAll viewports are locked! ") ) ) (princ) ) (DEFUN C:VL () (C:VLOCK)) (DEFUN lamacs_act (xstr act /) (SETQ la_match_list xstr) (chkcurlayofF la_match_list act) ;;; (princ "\nXSTR=") ;;; (princ xstr) ;;; (princ "\nACT=") ;;; (princ act) ;;; (princ"\n") ;;; (princ) (COMMAND ".layer" act xstr "" ) ;_ end of command ) ;_ end of defun (DEFUN c:brkof (/) (lamacs_act "*break*" "off")) (DEFUN c:brkon (/) (lamacs_act "*break*" "on")) (DEFUN c:gof (/) (lamacs_act "*vgrid*,*wgrid*,14,15,1,5" "off")) (DEFUN c:gon (/) (lamacs_act "*vgrid*,*wgrid*,14,15,1,5" "on")) (DEFUN c:gofall (/) (lamacs_act "*grid*,14,15,1,5" "off")) (DEFUN c:gonall (/) (lamacs_act "*grid*,14,15,1,5" "on")) (DEFUN c:pgof (/) (lamacs_act "*vi00dgrid,*vi00egrid,*vi00fgrid,*vi00ggrid,*vi00hgrid,c-profggrid,c-profhgrid,14,15,1,5" "off") ) ;_ end of defun (DEFUN c:grof (/) (lamacs_act "*grid*,13,14,15,1,5" "off")) (DEFUN c:Mgon (/) (lamacs_act "*egrid*" "on")) (DEFUN c:g100 (/) (lamacs_act "*text*hide*##00" "thaw")(lamacs_act "*grid?##00,*grid*hide*##00" "on")(movehdboxes)) (DEFUN c:g200 (/) (lamacs_act "*text*hide*##00" "thaw")(lamacs_act "*text*hide*#[1 5]00" "freeze")(lamacs_act "*grid?##00" "off")(lamacs_act "*grid?#[0 2]00,*grid*hide*#[0 2]00" "on")(movehdboxes)) (DEFUN c:g500 (/) (lamacs_act "*text*hide*##00" "thaw")(lamacs_act "*text*hide*#[1 2]00" "freeze")(lamacs_act "*grid?##00" "off")(lamacs_act "*grid?#[0 5]00,*grid*hide*#[0 5]00" "on")(movehdboxes)) (DEFUN c:g1k (/) (lamacs_act "*text*hide*##00" "thaw")(lamacs_act "*text*hide*#[1 2 5]00" "freeze")(lamacs_act "*grid?##00" "off")(lamacs_act "*grid?1000,*grid*hide*1000" "on")(movehdboxes)) (DEFUN c:g1000 (/) (lamacs_act "*text*hide*##00" "thaw")(lamacs_act "*text*hide*#[1 2 5]00" "freeze")(lamacs_act "*grid?##00" "off")(lamacs_act "*grid?1000,*grid*hide*1000" "on")(movehdboxes)) (DEFUN c:pgon (/) (lamacs_act "*grid,*vi00?grid,14,15,1,5" "on")) (DEFUN c:gron (/) (lamacs_act "*grid*,13,14,15,1,5" "on")) (DEFUN c:ptof (/) (lamacs_act "*desc,*elev,*pnts,*|point*,points,*topo7symb" "off")) (DEFUN c:pton (/) (lamacs_act "*desc,*elev,*pnts,*|point*,points,*topo7symb" "thaw")(lamacs_act "*desc,*elev,*pnts,*|point*,points,*topo7symb" "on")) (DEFUN c:ptfrz () (lamacs_act "*desc,*elev,*pnts,*|point*,points,*topo7symb" "freeze")) (DEFUN c:ptthw () (lamacs_act "*desc,*elev,*pnts,*topo7symb" "on") (lamacs_act "*desc,*elev,*pnts,*topo7symb" "thaw") ) ;_ end of defun (DEFUN c:imgof () (lamacs_act "*IMAG*,*IMG*" "of")) (DEFUN c:imgon () (lamacs_act "*IMAG*,*IMG*" "on")) (DEFUN c:imgfrz () (lamacs_act "*IMAG*,*IMG*" "freeze")) (DEFUN c:imgthw () (lamacs_act "*IMAG*,*IMG*" "thaw")) (DEFUN c:topon () (lamacs_act "csttpx??|*" "on")) (DEFUN c:topof () (lamacs_act"csttpx??|*" "off")) (DEFUN c:wdlnof (/) (lamacs_act "*wdln*" "off")) (DEFUN c:wdlnon (/) (lamacs_act "*wdln*" "on")) (DEFUN c:wdon () (lamacs_act "woods??|*" "on")) (DEFUN c:wdof () (lamacs_act "woods??|*" "off")) (DEFUN c:xron () (lamacs_act "*|*" "on")) (DEFUN c:xrof () (lamacs_act "*|*" "off")) (DEFUN c:svon () (lamacs_act "cstsv*|*" "on")) (DEFUN c:svof () (lamacs_act "cstsv*|*" "off")) (DEFUN c:paton (/) (lamacs_act "*patt*" "on")) (DEFUN c:patof () (lamacs_act "*patt*" "off")) (DEFUN c:rwon () (lamacs_act "*rw*,*row*" "on")) (DEFUN c:rwof () (lamacs_act "*rw*,*row*" "off")) (DEFUN c:eason () (lamacs_act "*eas*,*tce*,*esmt*" "on")) (DEFUN c:easof () (lamacs_act "*eas*,*tce*,*esmt*" "off")) (DEFUN c:epon () (lamacs_act "*ep*,*pvmt*,*pave*" "on")) (DEFUN c:epof () (lamacs_act "*ep*,*pvmt*,*pave*" "off")) (DEFUN c:tpon () (lamacs_act "csttpx*,*contours*,*TOPO*CN##*" "on")) (DEFUN c:tpof () (lamacs_act "csttpx*,*contours*,*TOPO*CN##*" "off")) (DEFUN c:exof (/) (lamacs_act "*|*" "off")) (DEFUN c:exon (/) (lamacs_act "*|*" "on")) (DEFUN c:txtof (/) (lamacs_act "*txt,*adjpar,*owner" "off")) (DEFUN c:txton (/) (lamacs_act "*txt,*adjpar,*owner" "on")) (DEFUN c:insof (/) (lamacs_act "*-ins" "freeze")) (DEFUN c:inson (/) (lamacs_act "*-ins" "thaw")) (DEFUN c:erof (/) (lamacs_act "*eroc*" "off")) (DEFUN c:eron (/) (lamacs_act "*eroc*" "on")) (DEFUN c:ctof (/) (lamacs_act "*CONT-MJR*,*CONT-MNR*,*TOPO?CN##*" "off")) (DEFUN c:cton (/) (lamacs_act "*CONT-MJR*,*CONT-MNR*,*TOPO?CN##*" "on")) (DEFUN c:ctthw (/) (lamacs_act "*CONT-MJR*,*CONT-MNR*,*TOPO?CN##*" "thaw")) (DEFUN c:ctfrz (/) (lamacs_act "*CONT-MJR*,*CONT-MNR*,*TOPO?CN##*" "freeze")) (DEFUN c:ctvpthw (/) (command ".vplayer" "thaw" "*CONT-MJR*,*CONT-MNR*,*TOPO?CN##*" "" "")) (DEFUN c:ppof (/) (lamacs_act "*[a c e f g i l m o p q s t z]?????[1 2 3 4 5 6 7 8 9 a b c d e f g h i][e n d f r x][s d t r]?#P*" "off")) (DEFUN c:ppon (/) (lamacs_act "*[a c e f g i l m o p q s t z]?????[1 2 3 4 5 6 7 8 9 a b c d e f g h i][e n d f r x][s d t r]?#P*" "on")) (DEFUN c:ppfr (/) (lamacs_act "*[a c e f g i l m o p q s t z]?????[1 2 3 4 5 6 7 8 9 a b c d e f g h i][e n d f r x][s d t r]?#P*" "freeze")) (DEFUN c:ppth (/) (lamacs_act "*[a c e f g i l m o p q s t z]?????[1 2 3 4 5 6 7 8 9 a b c d e f g h i][e n d f r x][s d t r]?#P*" "thaw")) (DEFUN c:hdof (/) (lamacs_act "*HIDE*,*WIPE*" "off")) (DEFUN c:hdon (/) (lamacs_act "*HIDE*,*WIPE*" "on")) (DEFUN c:hrof (/) (lamacs_act "*RAIL*HAND*" "off")) (DEFUN c:hron (/) (lamacs_act "*RAIL*HAND*" "on")) (DEFUN c:rbarof (/) (lamacs_act "*RBAR*" "off")) (DEFUN c:rbaron (/) (lamacs_act "*RBAR*" "on")) (DEFUN c:sof (/) (lamacs_act "*nplt*" "off")) (DEFUN c:son (/) (lamacs_act "*NPLT*" "on")) (DEFUN c:fillof (/) (lamacs_act "*fill*" "off")) (DEFUN c:fillon (/) (lamacs_act "*fill*" "on")) ;;;================================================================================================== ;;;Layer management tool (turn "non-plot" area hiding Solids On, always on a layer named *NPLT*AREA) See HDAREA (DEFUN c:aon (/) (lamacs_act "*nplt*area" "on")) ;;;================================================================================================== ;;;Layer management tool (turn "non-plot" area hiding Solids Off, always on a layer named *NPLT*AREA) See HDAREA (DEFUN c:aof (/) (lamacs_act "*nplt*area" "off")) (defun c:isoalt () (setq analt# (uint 1 "" "Enter alternate number to isolate" (if analt# analt#))) (lamacs_act "*alt#*" "off") (lamacs_act (strcat "*alt" (itoa analt#) "*") "on") ) (defun c:isoaltvp () (setq analt# (uint 1 "" "Enter alternate number to isolate in the curent viewport" (if analt# analt#))) (command "._vplayer" "f" "*alt#*" "current" "") (command "._vplayer" "t" (strcat "*alt" (itoa analt#) "*") "current" "") (lamacs_act (strcat "*alt" (itoa analt#) "*") "on") ) (defun c:alton () (lamacs_act "*alt#*" "on")) (defun c:altof () (lamacs_act "*alt#*" "off")) (defun c:alt0 () (lamacs_act "*alt#*" "off")(lamacs_act "*alt0*" "on")) (defun c:alt1 () (lamacs_act "*alt#*" "off")(lamacs_act "*alt1*" "on")) (defun c:alt2 () (lamacs_act "*alt#*" "off")(lamacs_act "*alt2*" "on")) (defun c:alt3 () (lamacs_act "*alt#*" "off")(lamacs_act "*alt3*" "on")) (defun c:alt4 () (lamacs_act "*alt#*" "off")(lamacs_act "*alt4*" "on")) (defun c:alnn () (lamacs_act "*al##*" "thaw")(lamacs_act "*al##*" "on")(command ".regen")) (defun c:al## () (setq scint (uint 1 "#0 #1 #2 #3 #4 #5 #6 #7 #8 #9 0# 1# 2# 3# 4# 5# 6# 7# 8# 9#" "Alternate number to display" nil)) (lamacs_act "*al##*" "off") (lamacs_act "*al##*" "freeze") (lamacs_act (strcat "*al" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "0" (ITOA scint)) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*al" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "0" (ITOA scint)) (ITOA scint))scint) "*") "on") (command ".regen") ) (defun c:lev0 () (lamacs_act "*lev#*" "off")(lamacs_act "*lev0*" "on")) (defun c:lev1 () (lamacs_act "*lev#*" "off")(lamacs_act "*lev1*" "on")) (defun c:lev2 () (lamacs_act "*lev#*" "off")(lamacs_act "*lev2*" "on")) (defun c:lev3 () (lamacs_act "*lev#*" "off")(lamacs_act "*lev3*" "on")) (defun c:lev4 () (lamacs_act "*lev#*" "off")(lamacs_act "*lev4*" "on")) (defun c:lvnn () (lamacs_act "*lv##*" "thaw")(lamacs_act "*lv##*" "on")(command ".regen")) (defun c:lv## () (setq scint (uint 1 "#0 #1 #2 #3 #4 #5 #6 #7 #8 #9 0# 1# 2# 3# 4# 5# 6# 7# 8# 9#" "Level number to display" nil)) (lamacs_act "*lv##*" "off") (lamacs_act "*lv##*" "freeze") (lamacs_act (strcat "*lv" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*lv" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "on") (lamacs_act (strcat "*lv" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*lv" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "on") (command ".regen") ) (defun c:plnn () (lamacs_act "*pl##*" "thaw")(lamacs_act "*pl##*" "on")(command ".regen")) (defun c:pl## () (setq scint (uint 1 "#0 #1 #2 #3 #4 #5 #6 #7 #8 #9 0# 1# 2# 3# 4# 5# 6# 7# 8# 9#" "Plan number to display" nil)) (lamacs_act "*pl##*" "off") (lamacs_act "*pl##*" "freeze") (lamacs_act (strcat "*pl" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*pl" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "on") (lamacs_act (strcat "*pl" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*pl" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "on") (command ".regen") ) (defun c:scnn () (lamacs_act "*sc##*" "thaw")(lamacs_act "*sc##*" "on")(command ".regen")) (defun c:sc## () (setq scint (uint 1 "#0 #1 #2 #3 #4 #5 #6 #7 #8 #9 0# 1# 2# 3# 4# 5# 6# 7# 8# 9#" "Section number to display" nil)) (lamacs_act "*sc##*" "off") (lamacs_act "*sc##*" "freeze") (lamacs_act (strcat "*sc" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*sc" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat "#" (ITOA scint)) (ITOA scint))scint) "*") "on") (lamacs_act (strcat "*sc" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "thaw") (lamacs_act (strcat "*sc" (IF (EQ (type scint) 'INT)(IF (EQ (STRLEN (ITOA scint)) 1)(strcat (ITOA scint) "#" ) (ITOA scint))scint) "*") "on") (command ".regen") ) (defun movehdboxes () (SETQ gridbox_ss (SSGET "X" '((-4 . "") ) ) ;_ end of ssget ) ;_ end of setq (SETQ gridtxt_ss (SSGET "X" '((-4 . "") ) ) ;_ end of ssget ) ;_ end of setq (IF gridbox_ss (command ".move" gridbox_ss "" "0,0" "" "") ) (IF gridtxt_ss (command ".move" gridtxt_ss "" "0,0" "" "") ) (princ) ) ;|«Visual LISP© Format Options» (120 2 15 2 T "end of " 100 9 2 0 nil nil nil T T) ;*** DO NOT add text below the comment! ***|;