;;;This function is intended to automate the positioning of a detail enlargement in a "numbered" viewport. ;;;The commands are ZC3 through ZC6 (additional command numbers may be easily added below). ;;; ;;;Viewport numbers are specified in characters 3-6 of the viewport layer name, e.g. C-VI037NPLT (This is a modified CLG format) ;;; ;;;In the example viewport layer name: ;;; 1st character "C" specifies it is a Civil layer. ;;; 2nd character "-" specifies the layer linetype is "continuous". ;;; (2nd character "-" is CLG but only if nothing is specified by it else it is non-CLG) ;;; 3rd through 6th character "VI03" specifies is a viewport number of 3. ;;; 7th character "7" specifies a layer color 7. ;;; (7th character "-" is CLG but only if nothing is specified by it else it is non-CLG) ;;; 8th through 11th character "NPLT" specifies it is a Non-Plot layer. ;;; ;;;VPSET, an external subroutine, works using this layer format. ;;;UPOINT is an external subroutine. ;;; ;;; Author: Henry C. Francis ;;; 425 N. Ashe St. ;;; Southern Pines, NC 28387 ;;; http://paracadd.com ;;; All rights reserved. ;;; ;;; COPYRIGHT: 11/17/2011 ;;; EDITED: 11/17/2011 ;;; (DEFUN newmvpc (vp# / new-vpctr new-vpscl new-vptwst) (IF vpset nil (LOAD "vpset" "\nFile VPSET.LSP loaded! ")) (IF upoint nil (LOAD "upoint" "\nFile UPOINT.LSP loaded! ")) (IF uint nil (LOAD "uint" "\nFile UINT.LSP loaded! ")) (vpset 2);View #2 is our standard Plan on P&P Sheets (Profile is view #1) (SETQ new-vpctr (upoint 1 "" (STRCAT "Pick new center for viewport #" (ITOA vp#)) nil nil)) (IF (EQ (STRCASE (GETVAR "loginname")) "CFRANCIS");others asked for the scale option. I don't care for it NIL (SETQ new-vpscl (uint 1 "" "New viewport scale" (IF new-vpscl new-vpscl 10))) ) (SETQ new-vptwst (* 180.0 (/(getvar"viewtwist")PI))) (COMMAND ".mview" "lock" "off" "all" "") (vpset vp#);extra views are typically as-built plan detail enlargements. They have unique view #'s (IF (EQ (STRCASE (GETVAR "loginname")) "CFRANCIS");others asked for the scale option. I don't care for it (COMMAND ".zoom" "c" new-vpctr 75.0);75.0 is standard height on our 1"=30' scaled view (PROGN (COMMAND ".zoom" "C" new-vpctr "") (COMMAND ".zoom" (STRCAT "1/" (ITOA new-vpscl) "XP") "") ) ) (Command "dview" "" "TW" new-vptwst "");Match the viewtwist from plan view (COMMAND ".mview" "lock" "on" "all" "") (c:tsnap) (COMMAND ".pspace") ) ;_ end of defun ;;;Viewport numbers 1 and 2 are the Profile and Plan respectively (DEFUN c:zc1 () (newmvpc 1)(PRINC)) (DEFUN c:zc2 () (newmvpc 2)(PRINC)) (DEFUN c:zc3 () (newmvpc 3)(PRINC)) (DEFUN c:zc4 () (newmvpc 4)(PRINC)) (DEFUN c:zc5 () (newmvpc 5)(PRINC)) (DEFUN c:zc6 () (newmvpc 6)(PRINC)) (DEFUN c:zc7 () (newmvpc 7)(PRINC)) (DEFUN c:zc8 () (newmvpc 8)(PRINC)) (DEFUN c:zc9 () (newmvpc 9)(PRINC)) (DEFUN c:zc10 () (newmvpc 10)(PRINC)) ;|«Visual LISP© Format Options» (100 2 15 2 T "end of " 100 15 2 0 2 nil nil nil T) ;*** DO NOT add text below the comment! ***|;