home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p065 / 3.img / MVSETUP.LSP < prev    next >
Encoding:
Text File  |  1990-10-08  |  78.8 KB  |  2,335 lines

  1. ;;;   MVSetup.lsp
  2. ;;;   Copyright (C) 1990 by Autodesk, Inc.
  3. ;;;  
  4. ;;;   THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. 
  5. ;;;   ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF 
  6. ;;;   MERCHANTABILITY ARE HEREBY DISCLAIMED.
  7. ;;; 
  8. ;;;   by Jan S. Yoder
  9. ;;;
  10. ;;;----------------------------------------------------------------------------
  11. ;;; DESCRIPTION
  12. ;;;
  13. ;;;   This is a new setup routine for Release 11 and Mview.
  14. ;;;   
  15. ;;;   It is based around a set of functionality that was determined to be a
  16. ;;;   necessary part of preparing a drawing for plotting.  This routine allows
  17. ;;;   the user to insert several pre-defined title blocks (ANSI A - E) and in
  18. ;;;   addition it allows the user to create a set of viewports within the 
  19. ;;;   title block just inserted.  A global scale may be specified as a ratio
  20. ;;;   between the scale of the title block in paperspace and the model geometry
  21. ;;;   in modelspace.  For example, if you were doing an engineering drawing at
  22. ;;;   a scale of 1:4 or quarter scale, then you would specify that you wanted
  23. ;;;   a ratio of 1 paperspace unit to 4 modelspace units.  The routine will 
  24. ;;;   convert this to 0.25xp for the Zoom command.  You may also elect to 
  25. ;;;   align the viewports.
  26. ;;;   
  27. ;;;   (The first time you invoke MVSETUP, you may notice a slight delay.
  28. ;;;   This occurs because the routine is creating a default file of various
  29. ;;;   title blocks and viewport layouts.  If you should accidentally erase
  30. ;;;   your default file, another will be created the next time you invoke
  31. ;;;   MVSETUP.  The file will be created in the directory specified by the
  32. ;;;   AutoCAD system variable "ACADPREFIX".  If you run AutoCAD from a
  33. ;;;   directory other than that one, and the system variables ACAD or ACADCFG
  34. ;;;   do not point to that directory, then MVSETUP will not be able to find 
  35. ;;;   it, and will create a new one in the directory pointed to by the first
  36. ;;;   path found in the current setting of the AutoCAD system variable 
  37. ;;;   "ACADPREFIX".)
  38. ;;;   
  39. ;;;   When you invoke MVSETUP from the command line or one of the menus, you
  40. ;;;   are given four options;  three dealing with the creation and manipulation
  41. ;;;   of viewports, and one which allows you to insert various "title blocks".
  42. ;;;   The initial prompts are shown below.
  43. ;;;   
  44. ;;;   
  45. ;;;         MVSetup, Version 1.0, (c) 1990 by Autodesk, Inc.  
  46. ;;;         Align viewports/Create viewports/Scale viewports/Title block/Undo:  
  47. ;;;         
  48. ;;;   The Align viewports option presents you with several more options; you
  49. ;;;   are asked to determine the type of alignment you wish to perform.
  50. ;;;   
  51. ;;;         Angled/Horizontal/Vertical alignment/Rotate view/Undo? 
  52. ;;;           
  53. ;;;   The Horizontal and Vertical options ask you to pick a basepoint in one
  54. ;;;   viewport, and the point to move in another viewport.  The view in the
  55. ;;;   second viewport is panned by the offset distance in X or Y between
  56. ;;;   the two points relative to the zoom scale factor of the second viewport.
  57. ;;;   
  58. ;;;   The Angled option asks you for these two points and for a distance and
  59. ;;;   angle from the basepoint.  The point in the first viewport at the 
  60. ;;;   specified distance and angle from the basepoint is where the "other"
  61. ;;;   point will be panned.
  62. ;;;   
  63. ;;;   The Rotate view option asks you for a basepoint and a rotation angle
  64. ;;;   and uses the DVIEW command to change the view twist.  This generally 
  65. ;;;   will be useful only when the UCS of the view you are rotating is 
  66. ;;;   parallel to the screen and would be used to align a view with an
  67. ;;;   angled edge with the Align Angled option.
  68. ;;;   
  69. ;;;   Selecting Create viewports prompts you with the following:
  70. ;;;   
  71. ;;;         Delete objects/<Create viewports>:
  72. ;;;   
  73. ;;;   Selecting Delete objects provides you with a general selection prompt
  74. ;;;   at which time you may delete any paperspace objects that you wish.
  75. ;;;   This is intended to allow you to clear an area for your new viewports.
  76. ;;;   Modelspace entities will NOT be removed.
  77. ;;;   
  78. ;;;   
  79. ;;;   Selecting Create viewports prompts you to select one of the viewport 
  80. ;;;   options listed.
  81. ;;;   
  82. ;;;         Available Mview viewport layout options: 
  83. ;;; 
  84. ;;;         0:       None
  85. ;;;         1:       Single
  86. ;;;         2:       Std. Engineering
  87. ;;;         3:       Array of Viewports
  88. ;;; 
  89. ;;;         Redisplay/<Number of entry to load>: 
  90. ;;;         
  91. ;;;   Pressing RETURN or selecting "None" returns you to the main prompt
  92. ;;;   without creating any viewports.  
  93. ;;;   
  94. ;;;   "Single" is a single viewport which can fill the default area open in 
  95. ;;;   the sheet or it can be located by picking two points on the screen.  
  96. ;;;   
  97. ;;;   Std. Engineering is a set of four viewports with the upper left viewport 
  98. ;;;   in plan view, the lower left in a front view, the lower right in a right 
  99. ;;;   side view, and the upper right in an oblique view at -45 degrees from 0 
  100. ;;;   and up 30 degrees.
  101. ;;;   
  102. ;;;   The "Array of Viewports" allows you to specify any array of viewports
  103. ;;;   that you want to place on your sheet, from a 1 by 2 or 2 by 1 to any
  104. ;;;   level allowed by AutoCAD.
  105. ;;;   
  106. ;;;   
  107. ;;;   After selecting option 1, 2 or 3, you are prompted to specify the bounding
  108. ;;;   area for the viewports that are to be created.  Each of the title blocks
  109. ;;;   provided has a bounding region defined for it in the default file.  You
  110. ;;;   can elect to create all of the viewports within this region by selecting 
  111. ;;;   "Default" at the following prompt:
  112. ;;;   
  113. ;;;         Bounding area for viewports.  Default/<First point >: 
  114. ;;;   
  115. ;;;   You can also select two points on the screen and the number of viewports 
  116. ;;;   you subsequently define will be mapped into this area.
  117. ;;;   
  118. ;;;   Picking options 2 or 3 prompts you to specify the distance between the
  119. ;;;   viewports; the interstitial distance.  This value must be a positive 
  120. ;;;   number but may be zero.  The value you enter for X is automatically
  121. ;;;   assigned to Y, though you may specify Y to have a different value.
  122. ;;;   If you selected option 2 above, then the four viewports are created and
  123. ;;;   the four views are mapped into them as defined in the default file.
  124. ;;;   The other options create the viewports but do not change the views in 
  125. ;;;   any of them; the view will be a plan view in the current UCS.
  126. ;;;   
  127. ;;;   
  128. ;;;   Selecting Scale viewports at the main menu prompts you to select the 
  129. ;;;   viewports you wish to scale.  If you select one or more viewports
  130. ;;;   you asked whether you wnat to set the zoom scales all at once or for
  131. ;;;   each viewport separately:
  132. ;;;   
  133. ;;;         Set zoom scale factors for viewports.  Interactively/<Uniform>:
  134. ;;;   
  135. ;;;   After selecting one of these you are asked the following;
  136. ;;;   
  137. ;;;         Enter the ratio of paper space units to model space units... 
  138. ;;;         Number of paper space units.  <1.0>: 
  139. ;;;         Number of model space units.  <1.0>: 
  140. ;;;   
  141. ;;;   The number of viewports specified will have their zoom scales changed
  142. ;;;   by the ratio of the paper space units divided by the model space units.
  143. ;;;   This is cumulative over time, so performing this operation twice with
  144. ;;;   paper space units set to 1.0 and model space units set to 2.0 will give
  145. ;;;   the same results as doing it once with 1.0 an 4.0 as the values.
  146. ;;;   
  147. ;;;   
  148. ;;;   Selecting Title block from the main menu gives you another sub-menu.
  149. ;;;   
  150. ;;;         Delete objects/Origin/<Insert title block>:
  151. ;;;   
  152. ;;;   Delete objects works as described above under Create viewports.
  153. ;;;   Origin allows you to specify a new UCS origin for the subsequent
  154. ;;;   insertion of a title block.  Pressing RETURN will cause you to be 
  155. ;;;   presented with a list of available title blocks or sheets.
  156. ;;;   
  157. ;;;         Available title block options:  
  158. ;;; 
  159. ;;;         0:       NONE
  160. ;;;         1:       ANSI-V Size
  161. ;;;         2:       ANSI-A Size
  162. ;;;         3:       ANSI-B Size
  163. ;;;         4:       ANSI-C Size
  164. ;;;         5:       ANSI-D Size
  165. ;;;         6:       ANSI-E Size
  166. ;;;         7:       Arch/Engineering (24 x 36)
  167. ;;; 
  168. ;;;         Add/Redisplay/<Number of entry to load>:      
  169. ;;;         
  170. ;;;   This list includes the ANSI standard sheet layouts from A to E and
  171. ;;;   includes size A Vertical.  Selecting the number preceding one of the
  172. ;;;   selections causes one of two things to occur.  One, if the AutoCAD
  173. ;;;   drawing associated with the selections cannot be found, then the 
  174. ;;;   default file is read, a definition is extracted, and the drawing is
  175. ;;;   created in your current drawing.  You are then asked whether you want
  176. ;;;   to save this drawing to disk.  If you want to use this drawing more
  177. ;;;   than once, you should answer Yes to this prompt.  Two, if the AutoCAD
  178. ;;;   drawing can be found then it is INSERTed into your drawing at 0,0.
  179. ;;;   
  180. ;;;   The other options are Add, Delete and Redisplay.
  181. ;;;   
  182. ;;;   Pressing RETURN or selecting 0 for "None" at this prompt returns you 
  183. ;;;   to the main menu.  Selecting the number of a viable entry causes one
  184. ;;;   of two things to occur:  if you selected one of the built-in entries,
  185. ;;;   and you have not created a drawing by the name associated with this 
  186. ;;;   entry, the default file is scanned for a definition, and if found, 
  187. ;;;   the title block is created in your current drawing.  You are asked
  188. ;;;   whether you want to create a drawing of the entities just created.
  189. ;;;   For example, picking 1 (ANSI-V Size) gives you the following prompt:
  190. ;;;   
  191. ;;;         Create a drawing named ansi-v.dwg? <Y>:
  192. ;;;   
  193. ;;;   Answering Yes causes a drawing to be created and reinserted into your
  194. ;;;   drawing where it was created.
  195. ;;;   
  196. ;;;   If the drawing already exists it is inserted at the current UCS origin.
  197. ;;;   This is the mechanism for using your own title blocks and parts of
  198. ;;;   title blocks.  
  199. ;;;   
  200. ;;;   Selecting Add after the available title blocks are listed gives you
  201. ;;;   the following prompts; example text is given in parentheses:
  202. ;;;   
  203. ;;;         Name to save: (Title block 1)
  204. ;;;   
  205. ;;;         Block to insert: (tb-1)
  206. ;;;   
  207. ;;;   A line looking like this
  208. ;;;   
  209. ;;;         Title block 1,tb-1.dwg
  210. ;;;   
  211. ;;;   is added after the last entry in the default file.
  212. ;;;   
  213. ;;;   Selecting Delete at the same prompt allows you to delete any of the 
  214. ;;;   lines listed except line 0.  Redisplay causes the list to be displayed 
  215. ;;;   again.
  216. ;;;   
  217. ;;;   If neither a valid drawing or a definition can be found you are so
  218. ;;;   informed and returned to the main menu.
  219. ;;;   
  220. ;;;   
  221. ;;;   
  222. ;;;   
  223. ;;;   
  224. ;;;   
  225. ;;;----------------------------------------------------------------------------;
  226. ;;;   
  227. ;;;   Multiple Viewport SETUP routine for Release 11
  228. ;;;   Start routine from a screen menu pick or from a pulldown menu item.
  229. ;;;   
  230. (defun mv_sup ( / mv_err s mv_oer mv_oce mv_olu ll_crn need_z)
  231.  
  232.   ;;
  233.   ;; Internal error handler defined locally
  234.   ;;
  235.  
  236.   (defun mv_err (s)                   ; If an error (such as CTRL-C) occurs
  237.                                       ; while this command is active...
  238.     (if (/= s "Function cancelled")
  239.       (if (= s "quit / exit abort")
  240.         (princ)
  241.         (princ (strcat "\nError: " s))
  242.       )
  243.     )
  244.     (if deffi (close deffi))
  245.     (if deffo (close deffo))
  246.     (command "undo" "end")
  247.     (if mv_oer                        ; If an old error routine exists
  248.       (setq *error* mv_oer)           ; then, reset it 
  249.     )
  250.     (setvar "cmdecho" mv_oce)         ; Reset command echoing on error
  251.     (if mv_olu (setvar "lunits" mv_olu)) ; Restore prev. linear units value
  252.     (princ)
  253.   )
  254.   
  255.   (if *error*                         ; If there is an error routine defined
  256.     (setq mv_oer   *error*            ; Store AutoLisp error routine
  257.           *error*  mv_err)            ; Temporarily replace it
  258.   )
  259.   
  260.   (setq mv_oce (getvar "cmdecho"))
  261.   (setvar "cmdecho" 0)                ; Turn off command echoing
  262.   (if (mv_ctm)                        ; Is Tile-mode on? T or nil
  263.     (mv_dos)                          ; Do old setup
  264.     ;; else    
  265.     (mv_dns)                          ; Do new setup
  266.   )
  267.   (if deffi (setq deffi (close deffi)))
  268.   (if deffo (setq deffo (close deffo)))
  269.   (setvar "cmdecho" mv_oce)           ; Reset command echoing
  270.   (if mv_oer                          ; If an old error routine exists
  271.     (setq *error* mv_oer)             ; then, reset it 
  272.   )
  273.   (princ)
  274. )
  275. ;;;
  276. ;;; Check Tile-mode.  Returns T if ON and nil if not on.
  277. ;;;
  278. ;;; mv_ctm == MView_Check_TileMode
  279. ;;;
  280. (defun mv_ctm ()
  281.   (if (= (getvar "TILEMODE") 1) 
  282.     (progn
  283.       (initget "Yes No")
  284.       (setq ans (getkword (strcat
  285.         "\nPaperspace/Modelspace is disabled.  The old setup will be "
  286.         "\ninvoked unless it is enabled.  Enable Paper/Modelspace?  <Y>: "))
  287.       )
  288.       (if (= ans "No")
  289.         T
  290.         (progn
  291.           (setvar "TILEMODE" 0)
  292.           nil
  293.         )
  294.       )
  295.     )
  296.     nil
  297.   )
  298. )
  299. ;;;
  300. ;;; Do a new setup relative to a point to be given by the user.
  301. ;;; The default is the current 0,0,0.
  302. ;;;
  303. ;;; mv_dns == MView_Do_New_Setup
  304. ;;;
  305. (defun mv_dns (/ mv_ver mv_xdf mv_xlf o_cvpt ans sset ITEM_LIST fd)
  306.  
  307.   (setq mv_ver "1.00b")               ; Reset this local if you make a change.
  308.   (setq mv_xpf (mv_cpf (getvar "acadprefix" )))
  309.   
  310.   (setq mv_xdf (strcat mv_xpf "mvsetup.dfs"))         
  311.   (setq mv_xlf "mvsetup.lsp")         ; Reset these locals if you make changes.
  312.   
  313.   (setq uctr 0)
  314.   (setq o_cvpt (getvar "cvport"))
  315.   (if (/= o_cvpt 1)
  316.     (command "pspace")                ; Change to paperspace
  317.   )
  318.                                         
  319.   ;; Look for external definitions --  set fd to file descriptor
  320.   (setq fd (mv_lfx mv_xdf "r"))         
  321.                                         
  322.   ;; Close the file, but do not set the handle to nil.
  323.   (if fd (close fd))
  324.                                         
  325.   (if (null fd)
  326.     ;; then
  327.     (progn
  328.       (princ (strcat "\n\tCreating the default file mvsetup.dfs" 
  329.                      "\n\tin the directory "
  330.                      mv_xpf ". "))
  331.       (mv_cdf)
  332.       (setq fd (mv_lfx mv_xdf "r"))
  333.  
  334.       ;; Close the file; we were just checking to see if it was there.
  335.       (close fd)
  336.     )
  337.     ;; else
  338.   )
  339.   (princ (strcat 
  340.     "\n\tMVSetup, Version " mv_ver ", (c) 1990 by Autodesk, Inc. "))
  341.   (setq temp T)
  342.   (while temp
  343.     (initget "Align Create Scale Title Undo")
  344.     (setq ans (getkword (strcat
  345.       "\n\tAlign viewports/Create viewports/"
  346.       "Scale viewports/Title block/Undo: ")))
  347.       
  348.     (cond
  349.       ((= ans "Align")
  350.         (mv_vpa)                      ; Viewport alignment
  351.       )
  352.       ((= ans "Create")
  353.         (setq temp1 T)
  354.         (while temp1
  355.           (initget "Create Delete Undo")
  356.           (setq ans (getkword 
  357.             "\n\tDelete objects/Undo/<Create viewports>: "))
  358.           (cond
  359.             ((= ans "Delete")
  360.               (command "undo" "group")
  361.               (setq uctr (1+ uctr))
  362.           
  363.               (princ "\n\tSelect the objects to delete: ")
  364.               (setq sset (ssget))
  365.               (if sset
  366.                 (command "erase" sset "")
  367.               )
  368.               (command "undo" "en")
  369.             )
  370.             ((= ans "Undo")
  371.               (cond
  372.                 ((= uctr 0) (princ "\n\tNothing to undo. \n"))
  373.                 ((> uctr 0) 
  374.                   (command "u")
  375.                   (setq uctr   (- uctr 1)
  376.                         ll_crn nil
  377.                   )
  378.                 )
  379.               ) 
  380.             )
  381.             (T
  382.               (command "undo" "group")
  383.               (setq uctr (1+ uctr))
  384.               (setq temp1 nil)
  385.               (if (setq deffi (mv_lfx mv_xdf "r"))
  386.                 (progn
  387.                   (textpage)
  388.                   (setq str1 "\n\tAvailable Mview viewport layout options: \n")
  389.             
  390.                   (setq vp_item_list (mv_pao "MVIEWS" str1))
  391.             
  392.                   (if (and (= (type vp_item_list) 'LIST) (null skip))
  393.                     (mv_mvi)
  394.                   )
  395.                   (setq deffi (close deffi))
  396.                 )
  397.                 (princ (strcat "
  398.                   \n\tCouldn't open the file " mv_xdf " for reading. "))
  399.               )
  400.               (command "undo" "en")
  401.             )
  402.           )
  403.         )
  404.         (command "undo" "en")
  405.       )
  406.       ((= ans "Scale")
  407.         (mv_szs)                      ; Set zoom scale factors
  408.       )
  409.       ((= ans "Title")
  410.         (setq temp1 T)
  411.         (while temp1
  412.           (if (/= (getvar "cvport") 1)
  413.             (command "pspace")
  414.           )
  415.           (initget "Delete Origin Insert Undo")
  416.           (setq ans (getkword 
  417.             "\n\tDelete objects/Origin/Undo/<Insert title block>: "))
  418.           (cond
  419.             ((= ans "Delete")
  420.               (command "undo" "group")
  421.               (setq uctr (1+ uctr))
  422.  
  423.               (princ "\n\tSelect the objects to delete: ")
  424.               (setq sset (ssget))
  425.               (if sset
  426.                 (command "erase" sset "")
  427.               )
  428.               (command "undo" "en")
  429.             )
  430.             ((= ans "Origin")
  431.               (command "undo" "group")
  432.               (setq uctr (1+ uctr))
  433.  
  434.               ;; Get an origin point for the new title block.
  435.               (initget 1)
  436.               (setq ans (getpoint '(0 0 0) 
  437.                 "\n\tNew origin point for this sheet: "))
  438.               (command "ucs" "o" ans)
  439.               (command "undo" "en")
  440.             )
  441.             ((= ans "Undo")
  442.               (cond
  443.                 ((= uctr 0) (princ "\n\tNothing to undo. \n"))
  444.                 ((> uctr 0) 
  445.                   (command "u")
  446.                   (setq uctr   (- uctr 1)
  447.                         ll_crn nil
  448.                   )
  449.                 )
  450.               ) 
  451.             )
  452.             (T
  453.               (command "undo" "group")
  454.               (setq uctr (1+ uctr))
  455.               (setq temp1 nil)
  456.               (if fd
  457.                 (mv_gop)
  458.                 (princ (strcat 
  459.                   "\nCouldn't open the file " mv_xdf " for reading. "))
  460.               )
  461.               (command "undo" "en")
  462.             )
  463.           )
  464.         )
  465.         (command "undo" "en")
  466.       )
  467.       ((= ans "Undo")
  468.         (cond
  469.           ((= uctr 0) (princ "\n\tNothing to undo. \n"))
  470.           ((> uctr 0) 
  471.             (command "u")
  472.             (setq uctr   (- uctr 1)
  473.                   ll_crn nil
  474.             )
  475.           )
  476.         ) 
  477.       )
  478.       (T
  479.         (setq temp nil)
  480.       )
  481.     )
  482.   )
  483.   (if (/= o_cvpt 1)
  484.     (progn
  485.       (setq sset (ssget "x" '((0 . "VIEWPORT"))))
  486.       (if sset 
  487.         (setq o_cvpt (mv_vvp o_cvpt sset))
  488.         (setq o_cvpt nil)
  489.       )
  490.       (command "mspace")              ; Change to modelspace
  491.       ;; If the previously current viewport has been deleted,
  492.       ;; this will do nothing.
  493.       (if o_cvpt (setvar "cvport" o_cvpt)) ; Restore previous active viewport
  494.     )
  495.   )
  496. )
  497. ;;;
  498. ;;; Return the first path in ACADPREFIX delimited by ";".
  499. ;;;
  500. ;;; mv_cpf == MView_Check_acadPreFix
  501. ;;;
  502. (defun mv_cpf (pf / temp)
  503.   (setq j 1
  504.         l (strlen pf)
  505.   )
  506.   (while (<= j l)
  507.     (if (= (substr pf j 1) ";")
  508.       (progn
  509.         (setq temp (substr pf 1 (1- j)))
  510.         (setq j (1+ l))
  511.       )
  512.       (setq j (1+ j))
  513.     )
  514.   )
  515.   (if temp
  516.     temp
  517.     pf
  518.   )
  519. )
  520. ;;;
  521. ;;; Verify the Mview viewport whose number we have in vp_n.
  522. ;;;
  523. ;;; mv_vvp == MView_Verify_ViewPort
  524. ;;;
  525. (defun mv_vvp (num sset / j vp ss_len cont)
  526.   (setq ss_len (sslength sset)
  527.         j      0
  528.         cont   T
  529.   )
  530.   (while (and cont (< j ss_len))
  531.     (setq temp (entget (ssname sset j)))
  532.     (setq j (1+ j))
  533.     (if (= (cdr(assoc 68 temp)) 2)
  534.       (setq vp temp)
  535.     )
  536.     (if (= (cdr(assoc 69 temp)) num)
  537.       (setq cont nil
  538.             vp   temp
  539.       )
  540.     )
  541.   )
  542.   (cdr(assoc 69 vp))
  543. )
  544. ;;;
  545. ;;; Align viewport geometry
  546. ;;;
  547. ;;; mv_vpa == MView_ViewPort_Align
  548. ;;;
  549. (defun mv_vpa ( / temp temp1 ans p1 pt1 p2 a1 d1)
  550.   (setq temp T)
  551.   (while temp
  552.     (initget "Angled Horizontal Rotate Vertical Undo")
  553.     (setq ans (getkword 
  554.       "\n\tAngled/Horizontal/Vertical alignment/Rotate view/Undo? "))
  555.     (if (or (= ans "") (= ans "Rotate") (= ans "Undo") (null ans))
  556.       (if (= ans "Rotate")
  557.         (progn
  558.           (princ "\n\tSpecify in which viewport the view is to be rotated. ")
  559.           (command "mspace")
  560.           (command "ucs" "w")
  561.           (setq p1 (getpoint "\n\tBasepoint: "))
  562.           (setq temp (getvar "cvport"))
  563.           (command "ucs" "v")
  564.           (setq a1 (getangle (trans p1 0 1) "\n\tAngle from basepoint: "))
  565.           (command "dview" ""  "tw" (* a1 (/ 180 pi)) "")
  566.           (command "ucs" "p")
  567.           (command "ucs" "p")
  568.           (command "pspace")
  569.         )
  570.         (if (= ans "Undo")
  571.           (cond
  572.             ((= uctr 0) (princ "\n\tNothing to undo. \n") )
  573.             ((> uctr 0) 
  574.               (command "u")
  575.               (setq uctr   (- uctr 1)
  576.                     ll_crn nil
  577.             )
  578.             )
  579.           ) 
  580.           (setq temp nil)
  581.         )
  582.       )
  583.       (progn
  584.         (command "undo" "group")
  585.         (setq uctr (1+ uctr))
  586.         (command "mspace")
  587.         (command "ucs" "w")
  588.         (setq p1 (getpoint "\n\tBasepoint: "))
  589.         (setq pt1 (trans (trans p1 1 2) 2 3))
  590.         (setq temp (getvar "cvport"))
  591.         
  592.         (setq p2 (getpoint "\n\tOther point: "))
  593.         (setq p2 (trans (trans p2 1 2) 2 3))
  594.         (cond 
  595.           ((= ans "Angled")
  596.             (setq temp1 (getvar "cvport"))
  597.             (if (= temp1 temp)
  598.               (princ "\n\tPoints must be in different viewports. ")
  599.               (progn
  600.                 (setvar "cvport" temp) 
  601.                 (setvar "orthomode" 0) 
  602.                 (princ (strcat
  603.                   "\n\tSpecify the distance and angle "
  604.                   "to the new alignment point "))  
  605.                 (princ (strcat
  606.                   "\n\tin the current viewport where "
  607.                   "you specified the basepoint. "))
  608.                 (setq d1 (getdist "\n\tDistance from basepoint: "))
  609.                 (setq a1 (getangle "\n\tAngle from basepoint: "))
  610.                 (setq p1 (polar p1 a1 d1))
  611.                 (setq p1 (trans (trans p1 1 2) 2 3))
  612.                 (setvar "cvport" temp1) 
  613.                 (command "ucs" "v")
  614.                 (command "pan" (trans p2 3 2) (trans p1 3 2))
  615.               )
  616.             )
  617.           )
  618.           ((= ans "Horizontal")
  619.             (setq temp1 (getvar "cvport"))
  620.             (command "ucs" "v")
  621.             (setq p1 (list (car p2) (cadr pt1) (caddr p2)))
  622.             (if (= temp1 temp)
  623.               (princ "\n\tPoints must be in different viewports. ")
  624.               (command "pan" (trans p2 3 2) (trans p1 3 2))
  625.             )
  626.           )
  627.           ((= ans "Vertical")
  628.             (setq temp1 (getvar "cvport"))
  629.             (command "ucs" "v")
  630.             (setq p1 (list (car pt1) (cadr p2) (caddr p2)))
  631.             (if (= temp1 temp)
  632.               (princ "\n\tPoints must be in different viewports. ")
  633.               (command "pan" (trans p2 3 2) (trans p1 3 2))
  634.             )
  635.           )
  636.           (T
  637.             (setq temp nil)
  638.           )
  639.         )
  640.         (command "ucs" "p")
  641.         (command "undo" "en")
  642.       )
  643.     )
  644.   )
  645. )
  646. ;;;
  647. ;;; Read lines from a file until the argument matches the given sub-string
  648. ;;;
  649. ;;; mv_rux == MView_Read_Until_Xx_found
  650. ;;;
  651. (defun mv_rux (str j k / l cont line)
  652.   (setq cont T l 1)
  653.   (while cont
  654.     (setq line (read-line deffi))
  655.     (setq l (1+ l))
  656.     ;; Seek to the first instance of str at position j - k.
  657.     (if line
  658.       (if (= (substr line j k) str)
  659.         (setq cont nil)
  660.       )
  661.       (progn
  662.         (setq cont nil l nil)
  663.       )
  664.     )
  665.   )
  666.   l                                   ; Return nil or line number where 
  667.                                       ; matching string is found
  668. )
  669. ;;;
  670. ;;; Tokenize the line, removing any blanks not within the string.
  671. ;;; Return the tokenized list of strings found.
  672. ;;;
  673. ;;; mv_tok == MView_TOKenize
  674. ;;;
  675. (defun mv_tok (str / sl j str_list)
  676.   (setq s_list (mv_tkw str))
  677.   (setq list_l (length s_list)
  678.         j      0
  679.   )
  680.   (while (< j list_l)
  681.     (setq s_list (subst (mv_tki (nth j s_list)) (nth j s_list) s_list))
  682.     (setq j (1+ j))
  683.   )
  684.   s_list
  685. )
  686. ;;;
  687. ;;; Tokenize the item, removing any leading and trailing blanks.
  688. ;;; Return the string.
  689. ;;;
  690. ;;; mv_tki == MView_ToKenize_Item
  691. ;;;
  692. (defun mv_tki (str / sl j k str_list)
  693.   (setq sl (strlen str)
  694.         j  1
  695.         k  0
  696.   )
  697.   (while (and (< j sl) (= (substr str j 1) " "))
  698.     (setq j (1+ j))
  699.   )
  700.   (while (and (< k sl) (= (substr str (- sl k) 1) " "))
  701.     (setq k (1+ k))
  702.   )
  703.   (substr str j (- sl k))
  704. )
  705. ;;;
  706. ;;; Tokenize a string into a list of strings.
  707. ;;; Return the tokenized string list.
  708. ;;;
  709. ;;; mv_tkw == MView_ToKenize_into_Words
  710. ;;;
  711. (defun mv_tkw (str / sl k)
  712.   (setq sl (strlen str)
  713.         k  0
  714.   )
  715.   (while (and (< k sl) (/= (substr str (1+ k) 1) ","))
  716.     (setq k (1+ k))
  717.   )
  718.   (if str_list 
  719.     (setq str_list (append str_list (list (substr str 1 k))))
  720.     (setq str_list (list (substr str 1 k)))
  721.   )
  722.   (setq k (+ k 2))
  723.   (if (< k sl)
  724.     (mv_tkw (substr str k))
  725.   )
  726.   str_list
  727. )
  728. ;;;
  729. ;;; List names on the screen until an end of list marker is found.
  730. ;;; Store the items found into a list, ITEM_LIST, a global
  731. ;;; Ignore blank lines and commented lines. Return number of lines.
  732. ;;;
  733. ;;; mv_lns == MView_List_Names_on_Screen
  734. ;;;
  735. (defun mv_lns (str j k / l cont line)
  736.   (setq cont T l -1)
  737.   (while cont
  738.     (if (setq line (read-line deffi))
  739.       ;; Seek to the end of the section delimited by "str"
  740.       ;; Else print the line to the screen preceded by an integer
  741.       (if (= (substr line j k) str)
  742.         (setq cont nil)
  743.         (progn
  744.           (setq l         (1+ l)
  745.                 item      (car (mv_tok line))
  746.                 ITEM_LIST (if item_list
  747.                             (append ITEM_LIST (list (mv_tok line)))
  748.                             (list (mv_tok line))
  749.                           )
  750.           )
  751.           (if (and (= (rem l 10) 1) (> l 1))
  752.             (if (= (rem l 20) 1)
  753.               (progn
  754.                 (princ "\n\t<more> ")
  755.                 (grread)
  756.               )
  757.               (terpri)
  758.             )
  759.           )
  760.           (princ (strcat "\n\t" (itoa l) ":\t " item))
  761.         )
  762.       )
  763.       (setq cont nil)
  764.     )
  765.   )
  766.   l
  767. )
  768. ;;;
  769. ;;; Add an entry to the default file.  Get all inputs.
  770. ;;;
  771. ;;; mv_aef == MView_Add_an_Entry_to_default_File
  772. ;;;
  773. (defun mv_aef ( / str ans deffo)
  774.   (setq ans (getstring T "\n\tTitle block description: "))
  775.   (if (not (or (= ans "") (null ans))) 
  776.     (progn
  777.       (setq str ans)
  778.       (setq ans (getstring "\n\tDrawing to insert: "))
  779.       (if (not (or (= ans "") (null ans))) 
  780.         (progn
  781.           (setq str (strcat str "," ans ".dwg"))
  782.           (close deffi)
  783.           (if (setq deffi (mv_lfx mv_xdf "r"))
  784.             (if (setq deffo (mv_lfx "temp.tdf" "w"))
  785.               (progn
  786.                 (setq cur_ln (+ cur_ln max_l))
  787.                 (repeat cur_ln (progn
  788.                   (write-line (read-line deffi) deffo)
  789.                 ))
  790.                 (write-line str deffo)
  791.                 (while (setq line (read-line deffi))
  792.                   (write-line line deffo)
  793.                 )
  794.               )
  795.             )
  796.           )
  797.           (setq deffo (close deffo))
  798.           (setq deffi (close deffi))
  799.           (if (setq deffi (mv_lfx "temp.tdf" "r"))
  800.             (if (setq deffo (mv_lfx mv_xdf "w"))
  801.               (while (setq line (read-line deffi))
  802.                 (write-line line deffo)
  803.               )
  804.             )
  805.           )
  806.           (setq deffo (close deffo))
  807.           (setq deffi (close deffi))
  808.           (command "files" "3" "temp.tdf" "" "")
  809.           (textpage)
  810.         )
  811.       )
  812.     )
  813.   )
  814. )
  815. ;;;
  816. ;;; Subtract an entry from the default file.  Get all inputs.
  817. ;;;
  818. ;;; mv_sef == MView_Subtract_an_Entry_from_default_File
  819. ;;;
  820. (defun mv_sef ( / str ans deffo)
  821.   (setq str (nth 0 d_item_list))
  822.   (setq deffi (close deffi))
  823.   (if (setq deffi (mv_lfx mv_xdf "r"))
  824.     (if (setq deffo (mv_lfx "temp.tdf" "w"))
  825.       (progn
  826.         (setq cur_ln (mv_rux str 1 (strlen str)))
  827.         (setq cur_ln (- cur_ln 2))
  828.         (close deffi)
  829.         (setq deffi (mv_lfx mv_xdf "r"))
  830.  
  831.         (repeat cur_ln (progn
  832.           (write-line (read-line deffi) deffo)
  833.         ))
  834.         (read-line deffi)
  835.         (while (setq line (read-line deffi))
  836.           (write-line line deffo)
  837.         )
  838.       )
  839.     )
  840.   )
  841.   (setq deffo (close deffo))
  842.   (setq deffi (close deffi))
  843.   (if (setq deffi (mv_lfx "temp.tdf" "r"))
  844.     (if (setq deffo (mv_lfx mv_xdf "w"))
  845.       (while (setq line (read-line deffi))
  846.         (write-line line deffo)
  847.       )
  848.     )
  849.   )
  850.   (setq deffo (close deffo))
  851.   (setq deffi (close deffi))
  852.   (command "files" "3" "temp.tdf" "" "")
  853.   (textpage)
  854.   (setq deffi (mv_lfx mv_xdf "r"))
  855.  
  856.   (princ)
  857. )
  858. ;;;
  859. ;;; Pick from the list by typing an integer, returns the item or zero.
  860. ;;; cont is global to this routine, local to the calling routine.
  861. ;;;
  862. ;;; mv_pfl == MView_Pick_From_List
  863. ;;;
  864. (defun mv_pfl (max_l ig_b ig_str prmpt / OK ans return str)
  865.   (while (null OK)
  866.     (initget ig_b ig_str)
  867.     (setq ans (getint prmpt))
  868.     (cond 
  869.       ((or (= ans "") (null ans))
  870.         (setq OK T cont nil return 0)
  871.       )
  872.       ((= ans "Add")
  873.         (mv_aef)
  874.         (setq OK T)
  875.       )
  876.       ((= ans "Delete")
  877.         (setq str "\n\tNumber of entry to delete from list: ")
  878.         (setq d_item_list (mv_pfl max_l 6 "" str))
  879.         (if (and d_item_list (> d_item_list 0))
  880.           (progn
  881.             (princ (strcat "\n\tDeleting " (car d_item_list) " from list. "))
  882.             (mv_sef)
  883.           )
  884.         )
  885.         (setq OK T cont T return 0)
  886.       )
  887.       ((= ans "Redisplay")
  888.         (setq OK T)
  889.       )
  890.       (T
  891.         (if (and (>= ans 0) (<= ans max_l))
  892.           (setq return (nth ans ITEM_LIST)
  893.                 OK     T
  894.                 cont   nil
  895.           )
  896.           (progn
  897.             (princ (strcat 
  898.               "\n\tNumber must be between 0 and " (itoa max_l) "\n"))
  899.             (setq OK nil)
  900.           )
  901.         )
  902.       )
  903.     )
  904.   )
  905.   return
  906. )
  907. ;;;
  908. ;;; Get the user's options
  909. ;;;
  910. ;;; mv_gop == MView_Get_OPtions
  911. ;;;
  912. (defun mv_gop (/ deffi d_item_name max_lines ans cont)
  913.   (if (setq deffi (mv_lfx mv_xdf "r"))
  914.     (progn
  915.       
  916.       (textpage)
  917.       (setq str1 "\n\tAvailable title block options: \n")
  918.       
  919.       (setq d_item_list (mv_pao "NAMES" str1))
  920.  
  921.       (if (and (= (type d_item_list) 'LIST) (null skip))
  922.         (progn
  923.           (mv_tbi)
  924.           (if (> (length d_item_list) 2) 
  925.             (progn
  926.               (setq ll_crn (nth 2 d_item_list))
  927.               (if (> (length d_item_list) 3)
  928.                 (setq ur_crn (nth 3 d_item_list))
  929.                 (setq ll_crn nil ur_crn nil)
  930.               )
  931.             )
  932.           )
  933.         )
  934.       )
  935.       (setq ITEM_LIST nil)
  936.  
  937.       (setq deffi (close deffi))
  938.       
  939.     )
  940.     (princ (strcat "\n\tCouldn't open the file " mv_xdf " for reading. "))
  941.   )
  942. )
  943. ;;;
  944. ;;; Pick options
  945. ;;;
  946. ;;; mv_pao == MView_Pick_An_Option
  947. ;;;
  948. (defun mv_pao (str str1 / cont max_lines d_item_list)
  949.   (setq cont T)
  950.   (while cont
  951.     (princ str1)
  952.     (setq cur_ln (mv_rux str 1 (strlen str)))
  953.     (setq ITEM_LIST nil)
  954.     (setq max_lines (mv_lns (strcat "END_" str) 
  955.                                           1 (+ 4 (strlen str))))
  956.     (setq d_item_list (mv_pfl max_lines 4 "Add Redisplay Delete"  
  957.       "\n\n\tAdd/Delete/Redisplay/<Number of entry to load>: "))
  958.     ;; 
  959.     ;; Skip the title block insertion if "None" is selected.
  960.     ;;
  961.     (if (and (= (type d_item_list) 'LIST) (= (car d_item_list) "None"))
  962.       (setq skip T)
  963.       (setq skip nil)
  964.     )
  965.     ;;
  966.     ;; If the Redisplay option is chosen, rewind the file by
  967.     ;; Closing it, opening it again, and seeking to the start
  968.     ;; of the NAMES section again.
  969.     ;;
  970.     (if cont
  971.       (progn
  972.         (if deffi (setq deffi (close deffi)))
  973.         (if (null (setq deffi (mv_lfx mv_xdf "r")))
  974.           (progn
  975.             (princ (strcat "\n\tCouldn't open  " mv_xdf " for reading."))
  976.             (setq cont nil)
  977.           )
  978.         )
  979.       )
  980.     )
  981.   )
  982.   d_item_list
  983. )
  984. ;;;
  985. ;;; Title block insertion
  986. ;;; Check that the drawing exists and if not, look for
  987. ;;; reject the selection.  If there is a definition, then
  988. ;;; execute it and perform the WBLOCK command, then
  989. ;;; insert the resulting block.
  990. ;;;
  991. ;;; mv_tbi == MView_Title_Block_Insertion
  992. ;;;
  993. (defun mv_tbi ()
  994.   ;; 
  995.   ;; a definition in the default file.  If that fails, then  
  996.   
  997.   (if (> (length d_item_list) 1) 
  998.     (if (setq block_name (findfile (nth 1 d_item_list)))
  999.       (progn
  1000.         (command "insert" block_name "0,0" "" "" "")
  1001.         (command "zoom" "e")
  1002.       )
  1003.       ;; Block named not found;  try to create it...
  1004.       (progn
  1005.         (setq block_name (nth 1 d_item_list))
  1006.         (setq e_last (cdr(assoc -1 (entget(entlast)))))
  1007.         (setq item_name (strcat "NAME - " (nth 0 d_item_list)))
  1008.         (if (mv_rux item_name 1 (strlen item_name))
  1009.           (mv_cfd)
  1010.         )
  1011.         (if (not (eq (cdr(assoc -1 (entget(entlast)))) e_last))
  1012.           (progn
  1013.             (setq sset (ssadd))   ; Create a null selection set.
  1014.             (while (setq e_last (if e_last (entnext e_last) (entnext)))
  1015.               (ssadd e_last sset) ; Add new entities to end of database.
  1016.             )
  1017.             (initget "Yes No")
  1018.             (setq ans (getkword (strcat
  1019.               "\n\tCreate a drawing named " block_name "? <Y>: ")))
  1020.             (if (= ans "No")
  1021.               ;; Then do nothing...
  1022.               (princ)
  1023.               ;; Else...
  1024.               (progn
  1025.                 (command "wblock" block_name "" "0,0" sset "")
  1026.                 (command "insert" block_name "0,0" "" "" "")
  1027.               )
  1028.             )
  1029.           )
  1030.           (progn
  1031.             (princ (strcat
  1032.               "\n\tCouldn't find a definition for block " block_name ". "))
  1033.             ;;(exit)
  1034.           )
  1035.         )
  1036.       )
  1037.     )
  1038.     (progn
  1039.       (setq d_item_list (strcat "NAME - " (nth 0 d_item_list)))
  1040.       (if (mv_rux d_item_list 1 (strlen d_item_list))
  1041.         (mv_cfd)
  1042.       )
  1043.     )
  1044.   )
  1045. )
  1046. ;;;
  1047. ;;; Create the mview viewports.
  1048. ;;;
  1049. ;;; mv_mvi == MView_MView_Insertion
  1050. ;;;
  1051. (defun mv_mvi (/ n_vp_x n_vp_y i_l_len p1 p2)
  1052.   (if (> (length vp_item_list) 0) 
  1053.     (progn
  1054.       (if (> (length vp_item_list) 2) 
  1055.         (setq n_vp_x (nth 1 vp_item_list)
  1056.               n_vp_y (nth 2 vp_item_list)
  1057.         )
  1058.       )
  1059.       (if (> (setq i_l_len (length vp_item_list)) 3) 
  1060.         (setq view_n (- i_l_len 3))  ; Number of views defined.
  1061.       )
  1062.       (setq d_item_name (strcat "VPSETNAME  - " (nth 0 vp_item_list)))
  1063.       (if (mv_rux d_item_name 1 (strlen d_item_name))
  1064.         (progn
  1065.           (mv_gba)                    ; Get bounding area
  1066.           (mv_gnv)                    ; Get number of viewport
  1067.           (mv_gid)                    ; Get interstitial distances
  1068.           (mv_cfp)                    ; Calculate first points
  1069.           (mv_cba)                    ; Check area is on-screen
  1070.           (setvar "osmode" 0)
  1071.           (command "mview" p1 p2)
  1072.           (setq f_vp_n (mv_gvn))      ; Get viewport number
  1073.           (mv_avp)                    ; Array other Mview viewports
  1074.           (setq l_vp_n (mv_gvn))      ; Get viewport number
  1075.           (mv_cav)                    ; Change the view of all viewports
  1076.         )
  1077.       )
  1078.     )
  1079.   )
  1080. )
  1081. ;;;
  1082. ;;; Set the zoom scale factors for a set of viewports.
  1083. ;;;
  1084. ;;; mv_szs == MView_Set_Zoom_Scales
  1085. ;;;
  1086. (defun mv_szs ( / temp)
  1087.   (command "undo" "group")
  1088.   (setq uctr (1+ uctr))
  1089.   (if (/= (getvar "cvport") 1)
  1090.     (command "pspace")
  1091.   )
  1092.   (princ "\n\tSelect the viewports to scale: ")
  1093.   (setq sset (ssget))
  1094.   (if sset
  1095.     (progn
  1096.       (if (> (sslength sset) 1)
  1097.         (progn
  1098.           (initget "Interactively Uniform")
  1099.           (setq ans (getkword (strcat
  1100.             "\n\tSet zoom scale factors for viewports.  "
  1101.             "Interactively/<Uniform>: "))
  1102.           )
  1103.           (if (= ans "Interactively")
  1104.             (setq vp_s_i T)
  1105.             (setq vp_s_i nil)
  1106.           )
  1107.         )
  1108.         (setq vp_s_i nil)
  1109.       )
  1110.       (setq temp (sslength sset)
  1111.             j    0
  1112.       )
  1113.       (if (= (getvar "cvport") 1)
  1114.         (command "mspace")
  1115.       )
  1116.       (while (< j temp)
  1117.         (progn
  1118.           (setq vp_n (cdr(assoc 69 (entget(ssname sset j)))))
  1119.           (setvar "cvport" vp_n)
  1120.           (setq j (1+ j))
  1121.           (if (or vp_s_i (< j 2))
  1122.             (mv_ssi)
  1123.           )
  1124.           (command "zoom" (strcat (mv_sts vp_scale) "xp"))
  1125.         )
  1126.       )
  1127.       (command "pspace")
  1128.     )
  1129.     (princ "\n\tNo viewports selected. ")
  1130.   )
  1131.   (command "undo" "en")
  1132. )
  1133. ;;;
  1134. ;;; Interactively set the scale of each viewport.
  1135. ;;;
  1136. ;;; mv_ssi == MView_Setup_Scale_Interactively
  1137. ;;;
  1138. (defun mv_ssi (/ ans)
  1139.   (princ "\n\tEnter the ratio of paper space units to model space units... ")
  1140.   (initget 6)
  1141.   (setq ans (getreal 
  1142.     "\n\tNumber of paper space units.  <1.0>: ")
  1143.   )
  1144.   (if (= (type ans) 'REAL)
  1145.     (setq vp_scale ans)
  1146.     (setq vp_scale 1.0)
  1147.   )
  1148.   (initget 6)
  1149.   (setq ans (getreal 
  1150.     "\n\tNumber of model space units.  <1.0>: ")
  1151.   )
  1152.   (if (= (type ans) 'REAL)
  1153.     (setq vp_scale (/ vp_scale ans))
  1154.     (setq vp_scale (/ vp_scale 1.0))
  1155.   )
  1156.   vp_scale
  1157. )
  1158. ;;;
  1159. ;;; Set up the scale either interactively or uniformly.
  1160. ;;;
  1161. ;;; mv_sus == MView_Set_Up_Scale
  1162. ;;;
  1163. (defun mv_sus ()
  1164.   (if vp_s_i
  1165.     (mv_ssi)
  1166.   )
  1167.     (setq vp (mv_gvp (+ n vp_n) sset))
  1168.   (command "zoom" (strcat (mv_sts vp_scale) "xp"))
  1169. )
  1170. ;;;
  1171. ;;; Convert a real number to its shortest value; no trailing zeros.
  1172. ;;;
  1173. ;;; mv_sts == MView_Scale_To_String
  1174. ;;;
  1175. (defun mv_sts (num / scale j return)
  1176.   (setq scale (rtos num 2 15)
  1177.         j     0
  1178.   )
  1179.   (while (< j (strlen scale))
  1180.     (if (= (setq return (substr scale (- (strlen scale) j) 1)) "0")
  1181.       (setq j (1+ j))
  1182.       (if (= return ".")
  1183.         (progn
  1184.           (setq return (substr scale 1 (- (strlen scale) (1- j)))) 
  1185.           (setq j (strlen scale))
  1186.         )
  1187.         (progn
  1188.           (setq return (substr scale 1 (- (strlen scale) j))) 
  1189.           (setq j (strlen scale))
  1190.         )
  1191.       )
  1192.     )
  1193.   )
  1194.   return
  1195. )
  1196. ;;;
  1197. ;;; Change to a new plan view and restore.
  1198. ;;;
  1199. ;;; mv_npv == MView_set_New_Plan_View
  1200. ;;;
  1201. (defun mv_npv (ord_1 amnt_1 ord_2 amnt_2)
  1202.   (command "ucs" ord_1 amnt_1)
  1203.   (command "ucs" ord_2 amnt_2)
  1204.   (command "plan" "" )
  1205.   (command "ucs" "p")
  1206.   (command "ucs" "p")
  1207.   (princ)
  1208. )
  1209. ;;;
  1210. ;;;Get the Mview viewport whose number we have in vp_n.
  1211. ;;;
  1212. ;;; mv_gvp == MView_Get_ViewPort
  1213. ;;;
  1214. (defun mv_gvp (num sset / j vp ss_len cont)
  1215.   (setq ss_len (sslength sset)
  1216.         j      0
  1217.         cont   T
  1218.   )
  1219.   (while (and cont (< j ss_len))
  1220.     (if (= (cdr(assoc 69 (setq vp (entget (ssname sset j))))) num)
  1221.       (setq cont nil)
  1222.     )
  1223.     (setq j (1+ j))
  1224.   )
  1225.   vp
  1226. )
  1227. ;;;
  1228. ;;; Change the view into all Mview viewports.
  1229. ;;;
  1230. ;;; mv_cav == MView_Change_All_Views
  1231. ;;;
  1232. (defun mv_cav (/ n sset vp_n vp)
  1233.   (if need_z
  1234.     (command "zoom" "e")
  1235.   )
  1236.   (setq n    0
  1237.         sset (ssget "x" '((0 . "VIEWPORT")))
  1238.         vp_n f_vp_n
  1239.   )
  1240.   (command "mspace")
  1241.   ;;(setvar "cvport" vp_n)
  1242.   ;; While we still have both viewports and view definitions for them...
  1243.   (while (and (< n view_n) (<= (+ n vp_n) l_vp_n))
  1244.     (setvar "cvport" (+ n vp_n))
  1245.     (setq vp (mv_gvp (+ n vp_n) sset))
  1246.     (cond 
  1247.       ((= (nth (+ 3 n) vp_item_list) "PLAN")
  1248.         (command "plan" "")
  1249.         ;;(mv_sus)
  1250.       )
  1251.       ((= (nth (+ 3 n) vp_item_list) "FRONT")
  1252.         (mv_npv "x"  "90" "x"  "0") 
  1253.         ;;(mv_sus)
  1254.       )
  1255.       ((= (nth (+ 3 n) vp_item_list) "RIGHT")
  1256.         (mv_npv "z"  "90" "x" "90")
  1257.         ;;(mv_sus)
  1258.       )
  1259.       ((= (nth (+ 3 n) vp_item_list) "LEFT")
  1260.         (mv_npv "z" "-90" "x" "90")
  1261.         ;;(mv_sus)
  1262.       )
  1263.       ((= (nth (+ 3 n) vp_item_list) "ISO")
  1264.         (command "vpoint" "r" "-45" "30")
  1265.         ;;(mv_sus)
  1266.       )
  1267.       (T
  1268.         (princ "\n\tUndefined view definition in default file. ")
  1269.         (exit)
  1270.       )
  1271.     )
  1272.     (setq n (1+ n))
  1273.   )
  1274.   (command "pspace")
  1275. )
  1276. ;;;
  1277. ;;; Array other Mview viewports.
  1278. ;;;
  1279. ;;; mv_avp == MView_Array_ViewPorts
  1280. ;;;
  1281. (defun mv_avp ( / dx dy)
  1282.   (if (and (> (car mvs_p4) 1) (> (cadr mvs_p4) 1))
  1283.     (progn
  1284.       (setq dx (+ (car mvs_p5)  (car mvs_p3)))
  1285.       (setq dy (+ (cadr mvs_p5)  (cadr mvs_p3)))
  1286.       (command "array" 
  1287.                (entlast) "" 
  1288.                "r" 
  1289.                (cadr mvs_p4)
  1290.                (car mvs_p4) 
  1291.                (+ (cadr mvs_p5) (cadr mvs_p3))
  1292.                (+ (car mvs_p5)  (car mvs_p3))
  1293.       )
  1294.     )
  1295.     (if (> (car mvs_p4) 1)
  1296.       (progn
  1297.         (setq dx (+ (car mvs_p5)  (car mvs_p3)))
  1298.         (command "array" 
  1299.                  (entlast) "" 
  1300.                  "r" 
  1301.                  (cadr mvs_p4)
  1302.                  (car mvs_p4) 
  1303.                  (+ (car mvs_p5)  (car mvs_p3))
  1304.         )
  1305.       )
  1306.       (if (> (cadr mvs_p4) 1)
  1307.         (progn
  1308.           (setq dy (+ (cadr mvs_p5)  (cadr mvs_p3)))
  1309.           (command "array" 
  1310.                    (entlast) "" 
  1311.                    "r" 
  1312.                    (cadr mvs_p4)
  1313.                    (car mvs_p4) 
  1314.                    (+ (cadr mvs_p5) (cadr mvs_p3))
  1315.           )
  1316.         )
  1317.       )
  1318.     )
  1319.   )
  1320. )
  1321. ;;;
  1322. ;;; Get the name of a Mview viewport.
  1323. ;;;
  1324. ;;; mv_gvn == MView_Get_Viewport_Name
  1325. ;;;
  1326. (defun mv_gvn ()
  1327.   (cdr(assoc 69 (entget(entlast))))
  1328. )
  1329. ;;;
  1330. ;;; Calculate the size of the individual viewports from the two
  1331. ;;; corner points, mvs_p1 and mvs_p2, the interstitial distances
  1332. ;;; held in mvs_p3, and the number of viewports held in mvs_p4.
  1333. ;;;
  1334. ;;; mv_cfp == MView_Calculate_First_Points
  1335. ;;;
  1336. (defun mv_cfp (/ x y dx dy )
  1337.   (if (> (car mvs_p1) (car mvs_p2))
  1338.     (setq x (car mvs_p1)
  1339.           mvs_p1 (list (car mvs_p2) (cadr mvs_p1) 0.0)
  1340.           mvs_p2 (list x (cadr mvs_p2) 0.0)
  1341.     )
  1342.   )
  1343.   (if (> (cadr mvs_p1) (cadr mvs_p2))
  1344.     (setq x (cadr mvs_p1)
  1345.           mvs_p1 (list (car mvs_p1) (cadr mvs_p2) 0.0)
  1346.           mvs_p2 (list (car mvs_p2) x 0.0)
  1347.     )
  1348.   )
  1349.   ;; Points are now sorted so that mvs_p1 IS lower left....
  1350.   (setq x  (- (car  mvs_p2) (car  mvs_p1))
  1351.         y  (- (cadr mvs_p2) (cadr mvs_p1))
  1352.         dx (/ (- x (* (1- (car  mvs_p4)) (car  mvs_p3))) (car  mvs_p4))
  1353.         dy (/ (- y (* (1- (cadr mvs_p4)) (cadr mvs_p3))) (cadr mvs_p4))
  1354.         p1 mvs_p1
  1355.         p2 (mapcar '+ p1 (setq mvs_p5  (list dx dy 0)))
  1356.   )
  1357. )
  1358. ;;;
  1359. ;;; Get the number of viewports in X and Y.
  1360. ;;; Sets the global mvs_p4 which is a point containing the X and Y
  1361. ;;; amounts as the (car) and (cadr) of mvs_p4.
  1362. ;;;
  1363. ;;; mv_gnv == MView_Get_Number_of_Viewports_in_x_and_y
  1364. ;;;
  1365. (defun mv_gnv (/ )
  1366.   (if n_vp_x
  1367.     (progn
  1368.       (setq mvs_p4 (list (read n_vp_x) (read n_vp_y) 0))
  1369.     )
  1370.     (progn
  1371.       (setq ans (getint "\n\tNumber of viewports in X. <1>: "))
  1372.       (if (= (type ans) 'INT)
  1373.         (setq mvs_p4 (list ans))
  1374.         (setq mvs_p4 (list 1))
  1375.       )
  1376.       (setq ans (getint "\n\tNumber of viewports in Y. <1>: "))
  1377.       (if (= (type ans) 'INT)
  1378.         (setq mvs_p4 (append mvs_p4 (list ans 0)))
  1379.         (setq mvs_p4 (append mvs_p4 (list 1   0)))
  1380.       )
  1381.     )
  1382.   )
  1383. )
  1384. ;;;
  1385. ;;; Get the horizontal and vertical distances between the viewports.
  1386. ;;; Sets the global mvs_p3 which is a point containing the X and Y
  1387. ;;; interstitial distances as the (car) and (cadr) of mvs_p3.
  1388. ;;;
  1389. ;;; mv_gid == MView_Get_Interstitial_Distances
  1390. ;;;
  1391. (defun mv_gid (/ )
  1392.   (setq mvs_p3 (list 0.0 0.0 0.0))
  1393.   (if (> (car mvs_p4) 1)
  1394.     (progn
  1395.       (setq ans (getdist (strcat 
  1396.         "\n\tDistance between viewports in X. <"
  1397.         (mv_sts (car mvs_p3))
  1398.         ">: ")))
  1399.       (if (= (type ans) 'REAL)
  1400.         (setq mvs_p3 (list ans ans ans))
  1401.       )
  1402.     )
  1403.   )
  1404.   (if (> (cadr mvs_p4) 1)
  1405.     (progn
  1406.       (setq ans (getdist (strcat 
  1407.         "\n\tDistance between viewports in Y. <"
  1408.         (mv_sts (cadr mvs_p3))
  1409.         ">: ")))
  1410.       (if (= (type ans) 'REAL)
  1411.         (setq mvs_p3 (list (car mvs_p3) ans (caddr mvs_p3)))
  1412.       )
  1413.     )
  1414.   )
  1415.   mvs_p3
  1416. )
  1417. ;;;
  1418. ;;; Get set up for creating viewports.
  1419. ;;; Sets the globals mvs_p1 and mvs_p2 which are the corners of the
  1420. ;;; allowable area for viewports in paperspace coordinates.
  1421. ;;;
  1422. ;;; mv_gba == MView_Get_Bounding_Area
  1423. ;;;
  1424. (defun mv_gba (/ )
  1425.   (if ll_crn
  1426.     (initget 1 "Default")
  1427.     (initget 1)
  1428.   )
  1429.   (graphscr)
  1430.   (setq ans (getpoint 
  1431.     (if ll_crn
  1432.       "\n\tBounding area for viewports.  Default/<First point >: "
  1433.       "\n\tBounding area for viewports.  First point: "
  1434.     )
  1435.   ))
  1436.   (if (= ans "Default")
  1437.     (progn
  1438.       (if ll_crn
  1439.         (setq mvs_p1 (read ll_crn)
  1440.               mvs_p2 (read ur_crn)
  1441.         )
  1442.         (progn
  1443.           (princ "\n\tNo default points defined. ")
  1444.           (exit)
  1445.         )
  1446.       )
  1447.     )
  1448.     (progn
  1449.       (initget 1)
  1450.       (setq mvs_p1 ans
  1451.             mvs_p2 (getcorner mvs_p1 "\n\tOther point: ")
  1452.       )
  1453.     )
  1454.   )
  1455. )
  1456. ;;;
  1457. ;;; Check that the corners given are on-screen.  If not, zoom so they are.
  1458. ;;;
  1459. ;;; mv_cba == MView_Check_Bounding_Area
  1460. ;;;
  1461. (defun mv_cba (/ vs vc ss dx dy)
  1462.   (setq vs (getvar "viewsize")
  1463.         vc (getvar "viewctr")
  1464.         ss (getvar "screensize")
  1465.         dx (* vs (/ (car ss) (cadr ss)))
  1466.   ) 
  1467.   (if (or (< (car  mvs_p1) (- (car vc) (/ dx 2.0)))
  1468.           (< (cadr mvs_p1) (- (cadr vc) (/ vs 2.0)))
  1469.           (> (car  mvs_p2) (+ (car vc) (/ dx 2.0)))
  1470.           (> (cadr mvs_p2) (+ (cadr vc) (/ vs 2.0)))
  1471.       )
  1472.     (setq need_z T)
  1473.   )          
  1474. )
  1475. ;;;
  1476. ;;; Create a title block or Mview viewport layout from the code in the 
  1477. ;;; default file.  This may be anything from inserting a block to actually 
  1478. ;;; drawing every  component of the title block from scratch.  Any 
  1479. ;;; single-line valid Lisp expression may be written in the default file 
  1480. ;;; after the DATA name.
  1481. ;;;
  1482. ;;; mv_cfd == MView_Create_From_Defaults
  1483. ;;;
  1484. (defun mv_cfd (/ cont theCmd)
  1485.   (setq cont T)
  1486.   (while cont
  1487.     (setq theCmd (mv_rpl))
  1488.     (if (= (substr theCmd 1 8) "END_ITEM")
  1489.       (progn
  1490.         (setq cont nil)
  1491.       )
  1492.       (mv_etl theCmd)
  1493.     )
  1494.   )
  1495. )
  1496. ;;;
  1497. ;;; Evaluate the line or string passed in.
  1498. ;;;
  1499. ;;; mv_etl == MView_Evaluate_The_Line
  1500. ;;;
  1501. (defun mv_etl (str / )
  1502.   ;(princ str)(terpri)
  1503.   (if (eval(read str)) T nil)
  1504. )
  1505. ;;;
  1506. ;;; Read and parse out a line of the Lisp code found in the defaults
  1507. ;;; file.  This must be done so that literal strings may be written
  1508. ;;; directly in the defaults file, without having to escape all of them.
  1509. ;;; We will do the escaping here, if necessary.
  1510. ;;; 
  1511. ;;; Return the escaped string
  1512. ;;;
  1513. ;;; mv_rpl == MView_Read_and_Parse_a_Line
  1514. ;;;
  1515. (defun mv_rpl ( / line j k sl str)
  1516.   (if (setq line (read-line deffi))
  1517.     (progn
  1518.       (setq j 1 k 1 sl (strlen line) str "")
  1519.       (while (<= j sl)
  1520.         (if (= (setq sb_str (substr line j k)) "\"")
  1521.           (setq str (strcat str "\""))
  1522.           (setq str (strcat str sb_str))
  1523.         )
  1524.         (setq j (1+ j))
  1525.       )
  1526.     )
  1527.     (progn
  1528.       (princ "\n\tNo lines left to read. ")
  1529.       (exit)
  1530.     )
  1531.   )
  1532.   str
  1533. )
  1534. ;;;
  1535. ;;; Create a default definitions file in the current directory
  1536. ;;; Read it out of this file (mvsetup.lsp) at the end of the file.
  1537. ;;;
  1538. ;;; mv_cdf == MView_Create_Defaults_File
  1539. ;;;
  1540. (defun mv_cdf (/ deffi deffo cont line)
  1541.   ;; The default file name for mvsetup is "mvsetup.dfs".
  1542.   ;; Look for it in AutoCAD's search paths
  1543.   ;;
  1544.   (if (setq deffi (mv_lfx "mvsetup.lsp" "r"))
  1545.     (if (setq deffo (mv_lfx mv_xdf "w"))
  1546.       (progn
  1547.         (setq cont T)
  1548.         (while cont
  1549.           (setq line (read-line deffi))
  1550.           ;; Seek to the start of the default file definition
  1551.           (if (= (substr line 1 13) ";;; Start DDF")
  1552.             (setq cont nil)
  1553.           )
  1554.         )
  1555.         ;; Start writing the file
  1556.         ;; Throw away the first four characters of each line to the EOF.
  1557.         
  1558.         (while (setq line (read-line deffi))
  1559.           ;; Seek to the start of the default file definition
  1560.           (write-line (substr line 5) deffo)
  1561.         )
  1562.         (setq deffi (close deffi))
  1563.         (setq deffo (close deffo))
  1564.       )
  1565.       (princ (strcat "\nError opening " mv_xdf " for writing. "))
  1566.     )
  1567.     (princ (strcat "\nError opening " mv_xlf " for reading. "))
  1568.   )
  1569. )
  1570. ;;;
  1571. ;;; Look for an external definitions file in AutoCAD's search path
  1572. ;;;
  1573. ;;; mv_lfx == MView_Look_For_eXternal_file
  1574. ;;;
  1575. (defun mv_lfx (f_name r_or_w / lfile)
  1576.   ;; Look for f_name in AutoCAD's search paths.
  1577.   (if (= r_or_w "w")
  1578.     (if (setq temp (open f_name r_or_w))
  1579.       temp                            ; Return file descriptor
  1580.       (progn
  1581.         (princ (strcat "\n\tCouldn't open " f_name " for writing. "))
  1582.         (exit)
  1583.       )
  1584.     )
  1585.     (if (setq lfile (findfile f_name))
  1586.       (if (setq temp (open lfile r_or_w))
  1587.         temp                          ; Return file descriptor
  1588.         (progn
  1589.           (princ (strcat "\n\tCouldn't open " f_name " for reading. "))
  1590.           (exit)
  1591.         )
  1592.       )
  1593.       nil                             ; or nil
  1594.     )
  1595.   )
  1596. )
  1597. ;;;
  1598. ;;; Change an existing setup, including the titleblock and/or viewports
  1599. ;;;
  1600. ;;; mv_coc == MView_Change_Or_Create?
  1601. ;;;
  1602. (defun mv_coc ()
  1603.   (initget "Create Update")
  1604.   (setq ans (getkword "\n\tUpdate current setup/<Create>: "))
  1605.   (if (= ans "Update")
  1606.     -1                                ; Return -1
  1607.      1                                ; Return  1
  1608.   )
  1609. )
  1610. ;;;
  1611. ;;; Do the old Release 10 setup -- we are in Release 10 mode.
  1612. ;;;
  1613. ;;; mv_ == MView_
  1614. ;;;
  1615. (defun mv_dos (/ temp xl yl)
  1616.  
  1617.   (princ "\n\tTILEMODE is set to 1;  cannot set up paperspace/modelspace")
  1618.   (princ "\n\tviewports unless TILEMODE is set to 0.  Release 10 setup: \n")
  1619.   
  1620.   (menucmd "S=UNITS")
  1621.        
  1622.   (initget 7)                         ; No null input, negative or zero values
  1623.  
  1624.   (setq temp (getint "\n\tSelect the Units from the screen menu: "))
  1625.   (menucmd (strcat "S=U" (itoa temp)))
  1626.  
  1627.   (setq mv_olu (getvar "lunits"))     ; Store current linear units setting
  1628.   (if (= temp 5)                      ; Set linear units to new value
  1629.     (setvar "lunits" 2)               ; If metric
  1630.     (setvar "lunits" temp)            ; otherwise
  1631.   )                                   
  1632.   
  1633.   (initget 5)                         ; 0 ok, but no null or negative values
  1634.  
  1635.   (setq mv_sc (getreal "\n\tSelect the Scale from the screen menu: "))
  1636.   (cond
  1637.     ((= mv_sc 0)
  1638.       (progn
  1639.        (initget 7)              
  1640.        (setq mv_sc (getreal "\n\tEnter the scale: "))
  1641.        (setq mv_sc (float mv_sc))
  1642.       )
  1643.     )
  1644.   )
  1645.   (cond
  1646.     ((= temp 5)
  1647.       (menucmd "S=METRIC")
  1648.     )
  1649.     (T
  1650.       (menucmd "S=ENGLISH")
  1651.     )
  1652.   )
  1653.   (initget 5)                         ; 0 ok, but no null or negative values
  1654.   (setq xl (getdist "\n\tSelect the Paper size from the screen menu: "))
  1655.   (initget 5)                         ; 0 ok, but no null or negative values
  1656.   (setq yl (getdist))
  1657.   (cond
  1658.     ((= xl 0)
  1659.       (progn
  1660.        (initget 7)                    ; No null, negative or zero values
  1661.        (setq xl (getdist "\n\tEnter the Horizontal Dimension of the paper: "))
  1662.        (initget 7)                    ; No null, negative or zero values
  1663.        (setq yl (getdist "\n\tEnter the Vertical Dimension of the paper: "))
  1664.       )
  1665.     )
  1666.   )
  1667.   (setq xl (* mv_sc xl) 
  1668.         yl (* mv_sc yl)
  1669.   )
  1670.   (command
  1671.     "limits" "0,0" (list xl yl)
  1672.     "pline" "0,0" (list 0 yl) (list xl yl) (list xl 0) "0,0" "c"
  1673.     "zoom" "a"
  1674.   )
  1675.   (menucmd "S=")
  1676.   (menucmd "S=")
  1677.   (menucmd "S=")
  1678. )
  1679. ;;;
  1680. ;;; C: function definition.
  1681. ;;;
  1682. (defun c:mvs () (vmon)(mv_sup))
  1683. (defun c:mvsetup () (vmon)(mv_sup))
  1684. (princ "\n\tC:MVSetup loaded.  Type MVS or MVSETUP to set up your drawing.")
  1685. (princ)
  1686.  
  1687. ;;;
  1688. ;;; The rest of this file in source form is the default file.  When creating
  1689. ;;; a default file, each line following the line which contains "Start DDF"
  1690. ;;; is read and written to the default file minus its first four characters.
  1691. ;;; 
  1692. ;;; This file contains definitions for ANSI A through E size title block 
  1693. ;;; sheets and several viewport setup options.  If this file is ever 
  1694. ;;; Kelvinated or protected, then this section should be stripped out and 
  1695. ;;; shipped separately.  Some code changes would also be required.
  1696. ;;;
  1697.  
  1698. ;;; Start DDF
  1699. ;;; ;;; Do NOT erase or change the first three lines
  1700. ;;; ;;; Version 1.0 -- (c) Autodesk, Inc.  26 February 1990
  1701. ;;; ;;; MetaView Setup Defaults
  1702. ;;; ;;; This file contains sets of defaults for setting up multiple viewport
  1703. ;;; ;;; configurations in Paperspace in Release 11 of AutoCAD.  It is intended
  1704. ;;; ;;; that you modify the entries given here to create your own customized
  1705. ;;; ;;; versions.  The format of the file is as follows:
  1706. ;;; ;;; 
  1707. ;;; ;;; The first part of the file is a list of the NAME's of the entries 
  1708. ;;; ;;; followed by an END_NAMES delimiter.
  1709. ;;; ;;; 
  1710. ;;; ;;; Each of the names may have optional, comma delimited fields in the
  1711. ;;; ;;; following order:  the first optional field is the file/path name of
  1712. ;;; ;;; an AutoCAD drawing which is to be inserted at the local UCS origin
  1713. ;;; ;;; when the name is selected, followed by a window in paperspace units
  1714. ;;; ;;; which represents the extents (in paperspace) of the usable paper
  1715. ;;; ;;; area.  This is the area which may be automatically filled with 
  1716. ;;; ;;; viewports.
  1717. ;;; ;;; 
  1718. ;;; ;;; The data portion of the file for any NAME entry is of arbitrary 
  1719. ;;; ;;; length, and contains lines of AutoLISP code with all coordinates 
  1720. ;;; ;;; in Paperspace units.  It is terminated with END_DATA.
  1721. ;;; ;;; 
  1722. ;;; ;;; Lines of AutoLisp code cannot be split across multiple lines.
  1723. ;;; ;;; 
  1724. ;;; ;;; Lines may be commented out with ";".
  1725. ;;; 
  1726. ;;; NAMES
  1727. ;;; None
  1728. ;;; ANSI-V Size    ,ansi-v.dwg,(0.505 2.125 0.0),(7.995 9.5777 0.0)
  1729. ;;; ANSI-A Size    ,ansi-a.dwg,(0.375 2.255 0.0),(10.625 6.9477 0.0)
  1730. ;;; ANSI-B Size    ,ansi-b.dwg,(0.745 0.505 0.0),(10.005 10.495 0.0)
  1731. ;;; ANSI-C Size    ,ansi-c.dwg,(0.625 0.875 0.0),(15.125 16.125 0.0)
  1732. ;;; ANSI-D Size    ,ansi-d.dwg,(1.125 0.625 0.0),(25.255 21.375 0.0)
  1733. ;;; ANSI-E Size    ,ansi-e.dwg,(0.625 1.125 0.0),(35.755 32.875 0.0)
  1734. ;;; Arch/Engineering (24 x 36) ,arch-a.dwg,(1.0 1.0 0.0),(30.5 23.0 0.0)
  1735. ;;; END_NAMES
  1736. ;;; 
  1737. ;;; DATA
  1738. ;;; 
  1739. ;;; NAME - None
  1740. ;;; (princ)                 
  1741. ;;; END_ITEM
  1742. ;;; 
  1743. ;;; An ANSI - A size Vertical sheet with Title block and revision bar.
  1744. ;;; All points are in paperspace units at a scale of 1 inch.
  1745. ;;; 
  1746. ;;; NAME - ANSI-V Size 
  1747. ;;; (command "zoom" "w" "-0.5,-0.5" "9.0,11.5")
  1748. ;;; (command "line" "0,0" "8.5,0" "8.5,11" "0,11" "C")
  1749. ;;; (command "line" ".38,.25" "8.12,.25" "8.12,10.75" ".38,10.75" "C")
  1750. ;;; ;;; Bottom microfilm alignment arrow
  1751. ;;; (command "pline" "4.25,0" "w" "0.02" "" "4.25,.1" "")
  1752. ;;; (command "solid" "4.1,.1" "4.4,.1" "4.25,.25" "" "")
  1753. ;;; ;;; Right microfilm alignment arrow
  1754. ;;; (command "pline" "8.37,5.5" "w" "0.02" "" "8.27,5.5" "")
  1755. ;;; (command "solid" "8.27,5.35" "8.27,5.65" "8.12,5.5" "" "")
  1756. ;;; ;;; Top microfilm alignment arrow
  1757. ;;; (command "pline" "4.25,11" "w" "0.02" "" "4.25,10.9" "")
  1758. ;;; (command "solid" "4.1,10.9" "4.4,10.9" "4.25,10.75" "" "")
  1759. ;;; ;;; Left microfilm alignment arrow
  1760. ;;; (command "pline" ".13,5.5" "w" "0.02" "" ".23,5.5" "")
  1761. ;;; (command "solid" ".23,5.35" ".23,5.65" ".38,5.5" "" "")
  1762. ;;; ;;;
  1763. ;;; ;;; Title block
  1764. ;;; ;;;
  1765. ;;; ;;; Horizontals
  1766. ;;; (command "line" "1.87,0.25" "1.87,2"    "8.12,2" "")
  1767. ;;; (command "line" "1.87,.565" "3.87,.565" "")
  1768. ;;; (command "line" "1.87,.88"  "8.12,.88"  "")
  1769. ;;; (command "line" "3.87,.5"   "8.12,.5"   "")
  1770. ;;; (command "line" "3.87,1.5"  "8.12,1.5"  "")
  1771. ;;; ;;;
  1772. ;;; ;;; Verticals
  1773. ;;; (command "line" "3.87,0.25" "3.87,2"  "")
  1774. ;;; (command "line" "4.87,.25"  "4.87,.5"  "")
  1775. ;;; (command "line" "6.37,.25"  "6.37,.5"  "")
  1776. ;;; (command "line" "4.25,.5"   "4.25,.88" "")
  1777. ;;; (command "line" "5.37,.5"   "5.37,.88" "")
  1778. ;;; (command "line" "7.74,.5"   "7.74,.88" "")
  1779. ;;; ;;;
  1780. ;;; ;;; Text
  1781. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1782. ;;; (command "text" "3.9223,.3425" "0.065" "0" "SCALE")
  1783. ;;; (command "text" "6.4228,.3425" "0.065" "0" "SHEET")
  1784. ;;; (command "text" "3.9579,.7659" "0.065" "0" "SIZE")
  1785. ;;; (command "text" "4.3189,.7659" "0.065" "0" "FSCM NO.")
  1786. ;;; (command "text" "5.4410,.7659" "0.065" "0" "DWG NO.")
  1787. ;;; (command "text" "7.8205,.7659" "0.065" "0" "REV")
  1788. ;;; ;;;
  1789. ;;; ;;; Revision bar
  1790. ;;; ;;;
  1791. ;;; ;;; Horizontals
  1792. ;;; (command "line" "2.62,10.5" "8.12,10.5" "")
  1793. ;;; (command "line" "2.62,10.25" "8.12,10.25" "")
  1794. ;;; ;;;
  1795. ;;; ;;; Verticals
  1796. ;;; (command "line" "2.62,10.75" "2.62,9.7027" "")
  1797. ;;; (command "line" "3.12,10.25" "3.12,10.5" "")
  1798. ;;; (command "line" "3.50,10.25" "3.50,10.5" "")
  1799. ;;; (command "line" "6.24,10.25" "6.24,10.5" "")
  1800. ;;; (command "line" "7.12,10.25" "7.12,10.5" "")
  1801. ;;; ;;;
  1802. ;;; ;;; Revision bar text
  1803. ;;; ;;;
  1804. ;;; (command "text" "5.3302,10.5825" "0.065" "0" "REVISIONS")
  1805. ;;; (command "text" "2.7287,10.3403" "0.065" "0" "ZONE")
  1806. ;;; (command "text" "3.2001,10.3403" "0.065" "0" "REV")
  1807. ;;; (command "text" "4.5020,10.3403" "0.065" "0" "DESCRIPTION")
  1808. ;;; (command "text" "6.5677,10.3403" "0.065" "0" "DATE")
  1809. ;;; (command "text" "7.3614,10.3403" "0.065" "0" "APPROVED")
  1810. ;;; END_ITEM
  1811. ;;; 
  1812. ;;; An ANSI - A size sheet with Title block and revision bar.
  1813. ;;; All points are in paperspace units at a scale of 1 inch.
  1814. ;;; 
  1815. ;;; NAME - ANSI-A Size 
  1816. ;;; (command "zoom" "w" "-0.5,-0.5" "11.5,9.0")
  1817. ;;; (command "line" "0,0" "11,0" "11,8.5" "0,8.5" "C")
  1818. ;;; (command "line" ".25,.38" "10.75,.38" "10.75,8.12" ".25,8.12" "C")
  1819. ;;; ;;; Bottom microfilm alignment arrow
  1820. ;;; (command "pline" "5.5,.13" "w" "0.02" "" "5.5,.23" "")
  1821. ;;; (command "solid" "5.35,.23" "5.65,.23" "5.5,.38" "" "")
  1822. ;;; ;;; Right microfilm alignment arrow
  1823. ;;; (command "pline" "11,4.25" "w" "0.02" "" "10.9,4.25" "")
  1824. ;;; (command "solid" "10.9,4.1" "10.9,4.4" "10.75,4.25" "" "")
  1825. ;;; ;;; Top microfilm alignment arrow
  1826. ;;; (command "pline" "5.5,8.37" "w" "0.02" "" "5.5,8.27" "")
  1827. ;;; (command "solid" "5.35,8.27" "5.65,8.27" "5.5,8.12" "" "")
  1828. ;;; ;;; Left microfilm alignment arrow
  1829. ;;; (command "pline" "0,4.25" "w" "0.02" "" ".1,4.25" "")
  1830. ;;; (command "solid" ".1,4.1" ".1,4.4" ".25,4.25" "" "")
  1831. ;;; ;;;
  1832. ;;; ;;; Title block
  1833. ;;; ;;;
  1834. ;;; ;;; Horizontals
  1835. ;;; (command "line" "4.5,.38"   "4.5,2.13"   "10.75,2.13" "")
  1836. ;;; (command "line" "4.5,.695"  "6.5,.695"   "")
  1837. ;;; (command "line" "4.5,1.01"  "10.75,1.01" "")
  1838. ;;; (command "line" "6.5,.63"   "10.75,.63"  "")
  1839. ;;; (command "line" "6.5,1.63"  "10.75,1.63" "")
  1840. ;;; ;;;
  1841. ;;; ;;; Verticals
  1842. ;;; (command "line" "6.5,0.38" "6.5,2.13"  "")
  1843. ;;; (command "line" "7.5,.38"   "7.5,.63"    "")
  1844. ;;; (command "line" "9.0,.38"   "9.0,.63"    "")
  1845. ;;; (command "line" "6.88,.63"  "6.88,1.01"  "")
  1846. ;;; (command "line" "8,.63"     "8,1.01"     "")
  1847. ;;; (command "line" "10.37,.63" "10.37,1.01" "")
  1848. ;;; ;;;
  1849. ;;; ;;; Text
  1850. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1851. ;;; (command "text" "6.5523,0.4725" "0.065" "0" "SCALE")
  1852. ;;; (command "text" "9.0528,0.4725" "0.065" "0" "SHEET")
  1853. ;;; (command "text" "6.5879,0.8959" "0.065" "0" "SIZE")
  1854. ;;; (command "text" "6.9489,0.8959" "0.065" "0" "FSCM NO.")
  1855. ;;; (command "text" "8.0710,0.8959" "0.065" "0" "DWG NO.")
  1856. ;;; (command "text" "10.4505,0.8959" "0.065" "0" "REV")
  1857. ;;; ;;;
  1858. ;;; ;;; Revision bar
  1859. ;;; ;;;
  1860. ;;; ;;; Horizontals
  1861. ;;; (command "line" "5.25,7.87" "10.75,7.87" "")
  1862. ;;; (command "line" "5.25,7.62" "10.75,7.62" "")
  1863. ;;; ;;;
  1864. ;;; ;;; Verticals
  1865. ;;; (command "line" "5.25,8.12" "5.25,7.0727" "")
  1866. ;;; (command "line" "5.75,7.62" "5.75,7.87" "")
  1867. ;;; (command "line" "6.13,7.62" "6.13,7.87" "")
  1868. ;;; (command "line" "8.87,7.62" "8.87,7.87" "")
  1869. ;;; (command "line" "9.75,7.62" "9.75,7.87" "")
  1870. ;;; ;;;
  1871. ;;; ;;; Revision bar text
  1872. ;;; ;;;
  1873. ;;; (command "text" "7.9602,7.9525" "0.065" "0" "REVISIONS")
  1874. ;;; (command "text" "5.3587,7.7103" "0.065" "0" "ZONE")
  1875. ;;; (command "text" "5.8301,7.7103" "0.065" "0" "REV")
  1876. ;;; (command "text" "7.1320,7.7103" "0.065" "0" "DESCRIPTION")
  1877. ;;; (command "text" "9.1977,7.7103" "0.065" "0" "DATE")
  1878. ;;; (command "text" "9.9914,7.7103" "0.065" "0" "APPROVED")
  1879. ;;; END_ITEM
  1880. ;;; 
  1881. ;;; An ANSI - B size sheet with Title block and revision bar.
  1882. ;;; All points are in paperspace units at a scale of 1 inch.
  1883. ;;; 
  1884. ;;; NAME - ANSI-B Size 
  1885. ;;; (command "zoom" "w" "-0.5,-0.5" "17.5,11.5")
  1886. ;;; (command "line" "0,0" "17,0" "17,11" "0,11" "C")
  1887. ;;; (command "line" ".62,.38" "16.38,.38" "16.38,10.62" ".62,10.62" "C")
  1888. ;;; ;;; Bottom microfilm alignment arrow
  1889. ;;; (command "pline" "8.5,.13" "w" "0.02" "" "8.5,.23" "")
  1890. ;;; (command "solid" "8.35,.23" "8.65,.23" "8.5,.38" "" "")
  1891. ;;; ;;; Right microfilm alignment arrow
  1892. ;;; (command "pline" "16.62,5.5" "w" "0.02" "" "16.52,5.5" "")
  1893. ;;; (command "solid" "16.52,5.35" "16.52,5.65" "16.38,5.5" "" "")
  1894. ;;; ;;; Top microfilm alignment arrow
  1895. ;;; (command "pline" "8.5,10.87" "w" "0.02" "" "8.5,10.77" "")
  1896. ;;; (command "solid" "8.35,10.77" "8.65,10.77" "8.5,10.62" "" "")
  1897. ;;; ;;; Left microfilm alignment arrow
  1898. ;;; (command "pline" ".38,5.5" "w" "0.02" "" ".48,5.5" "")
  1899. ;;; (command "solid" ".48,5.35" ".48,5.65" ".62,5.5" "" "")
  1900. ;;; ;;;
  1901. ;;; ;;; Title block
  1902. ;;; ;;;
  1903. ;;; ;;; Horizontals
  1904. ;;; (command "line" "10.13,.38"   "10.13,2.13"   "16.38,2.13" "")
  1905. ;;; (command "line" "10.13,.695"  "12.13,.695"   "")
  1906. ;;; (command "line" "10.13,1.01"  "16.38,1.01" "")
  1907. ;;; (command "line" "12.13,.63"   "16.38,.63"  "")
  1908. ;;; (command "line" "12.13,1.63"  "16.38,1.63" "")
  1909. ;;; ;;;
  1910. ;;; ;;; Verticals
  1911. ;;; (command "line" "12.13,0.38" "12.13,2.13"  "")
  1912. ;;; (command "line" "13.13,.38" "13.13,.63"   "")
  1913. ;;; (command "line" "14.63,.38" "14.63,.63"   "")
  1914. ;;; (command "line" "12.51,.63" "12.51,1.01"  "")
  1915. ;;; (command "line" "13.63,.63" "13.63,1.01"  "")
  1916. ;;; (command "line" "16,.63"    "16,1.01"     "")
  1917. ;;; ;;;
  1918. ;;; ;;; Text
  1919. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1920. ;;; (command "text" "12.1823,0.4725" "0.065" "0" "SCALE")
  1921. ;;; (command "text" "14.6828,0.4725" "0.065" "0" "SHEET")
  1922. ;;; (command "text" "12.2179,0.8959" "0.065" "0" "SIZE")
  1923. ;;; (command "text" "12.5789,0.8959" "0.065" "0" "FSCM NO.")
  1924. ;;; (command "text" "13.7010,0.8959" "0.065" "0" "DWG NO.")
  1925. ;;; (command "text" "16.0805,0.8959" "0.065" "0" "REV")
  1926. ;;; ;;;
  1927. ;;; ;;; Revision bar
  1928. ;;; ;;;
  1929. ;;; ;;; Horizontals
  1930. ;;; (command "line" "10.88,10.37" "16.38,10.37" "")
  1931. ;;; (command "line" "10.88,10.12" "16.38,10.12" "")
  1932. ;;; ;;;
  1933. ;;; ;;; Verticals
  1934. ;;; (command "line" "10.88,10.62" "10.88,9.5727" "")
  1935. ;;; (command "line" "11.38,10.12" "11.38,10.37" "")
  1936. ;;; (command "line" "11.76,10.12" "11.76,10.37" "")
  1937. ;;; (command "line" "14.5,10.12" "14.5,10.37" "")
  1938. ;;; (command "line" "15.38,10.12" "15.38,10.37" "")
  1939. ;;; ;;;
  1940. ;;; ;;; Revision bar text
  1941. ;;; ;;;
  1942. ;;; (command "text" "13.5902,10.4525" "0.065" "0" "REVISIONS")
  1943. ;;; (command "text" "10.9887,10.2103" "0.065" "0" "ZONE")
  1944. ;;; (command "text" "11.4601,10.2103" "0.065" "0" "REV")
  1945. ;;; (command "text" "12.7620,10.2103" "0.065" "0" "DESCRIPTION")
  1946. ;;; (command "text" "14.8277,10.2103" "0.065" "0" "DATE")
  1947. ;;; (command "text" "15.6214,10.2103" "0.065" "0" "APPROVED")
  1948. ;;; END_ITEM
  1949. ;;; 
  1950. ;;; An ANSI - C size sheet with Title block and revision bar.
  1951. ;;; All points are in paperspace units at a scale of 1 inch.
  1952. ;;; 
  1953. ;;; NAME - ANSI-C Size 
  1954. ;;; (command "zoom" "w" "-0.5,-0.5" "22.5,17.5")
  1955. ;;; (command "line" "0,0" "22,0" "22,17" "0,17" "C")
  1956. ;;; (command "line" ".5,.75" "21.5,.75" "21.5,16.25" ".5,16.25" "C")
  1957. ;;; (command "line" "5.5,0.375" "5.5,0.75" "")
  1958. ;;; (command "array" (entlast) "" "R" "2" "2" "15.875" "11")
  1959. ;;; (command "line" "0.125,4.25" "0.5,4.25" "")
  1960. ;;; (command "array" (entlast) "" "R" "2" "2" "8.5" "21.375")
  1961. ;;; ;;;
  1962. ;;; ;;; Bottom microfilm alignment arrow
  1963. ;;; (command "pline" "11,.5" "w" "0.02" "" "11,.6" "")
  1964. ;;; (command "solid" "10.85,.6" "11.15,.6" "11,.75" "" "")
  1965. ;;; ;;; Right microfilm alignment arrow
  1966. ;;; (command "pline" "21.75,8.5" "w" "0.02" "" "21.65,8.5" "")
  1967. ;;; (command "solid" "21.65,8.35" "21.65,8.65" "21.5,8.5" "" "")
  1968. ;;; ;;; Top microfilm alignment arrow
  1969. ;;; (command "pline" "11,16.5" "w" "0.02" "" "11,16.4" "")
  1970. ;;; (command "solid" "10.85,16.4" "11.15,16.4" "11,16.25" "" "")
  1971. ;;; ;;; Left microfilm alignment arrow
  1972. ;;; (command "pline" ".25,8.5" "w" "0.02" "" ".35,8.5" "")
  1973. ;;; (command "solid" ".35,8.35" ".35,8.65" ".5,8.5" "" "")
  1974. ;;; ;;;
  1975. ;;; ;;; Title block
  1976. ;;; ;;;
  1977. ;;; ;;; Horizontals
  1978. ;;; (command "line" "15.25,0.75"   "15.25,2.5"   "21.50,2.5" "")
  1979. ;;; (command "line" "15.25,1.065"  "17.25,1.065"   "")
  1980. ;;; (command "line" "15.25,1.38"  "21.5,1.38" "")
  1981. ;;; (command "line" "17.25,1"   "21.5,1"  "")
  1982. ;;; (command "line" "17.25,2"  "21.5,2" "")
  1983. ;;; ;;;
  1984. ;;; ;;; Verticals
  1985. ;;; (command "line" "17.25,0.75" "17.25,2.5"  "")
  1986. ;;; (command "line" "18.25,0.75" "18.25,1"    "")
  1987. ;;; (command "line" "19.75,0.75" "19.75,1"    "")
  1988. ;;; (command "line" "17.63,1"    "17.63,1.38" "")
  1989. ;;; (command "line" "18.75,1"    "18.75,1.38" "")
  1990. ;;; (command "line" "21.12,1"    "21.12,1.38" "")
  1991. ;;; ;;;
  1992. ;;; ;;; Text
  1993. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1994. ;;; (command "text" "17.3023,0.8425" "0.065" "0" "SCALE")
  1995. ;;; (command "text" "19.8028,0.8425" "0.065" "0" "SHEET")
  1996. ;;; (command "text" "17.3379,1.2659" "0.065" "0" "SIZE")
  1997. ;;; (command "text" "17.6989,1.2659" "0.065" "0" "FSCM NO.")
  1998. ;;; (command "text" "18.8210,1.2659" "0.065" "0" "DWG NO.")
  1999. ;;; (command "text" "21.2005,1.2659" "0.065" "0" "REV")
  2000. ;;; ;;;
  2001. ;;; ;;; Revision bar
  2002. ;;; ;;;
  2003. ;;; ;;; Horizontals
  2004. ;;; (command "line" "16,16" "21.5,16" "")
  2005. ;;; (command "line" "16,15.75" "21.5,15.75" "")
  2006. ;;; ;;;
  2007. ;;; ;;; Verticals
  2008. ;;; (command "line" "16,16.25" "16,15.2027" "")
  2009. ;;; (command "line" "16.5,15.75" "16.5,16" "")
  2010. ;;; (command "line" "16.88,15.75" "16.88,16" "")
  2011. ;;; (command "line" "19.62,15.75" "19.62,16" "")
  2012. ;;; (command "line" "20.5,15.75" "20.5,16" "")
  2013. ;;; ;;;
  2014. ;;; ;;; Revision bar text
  2015. ;;; ;;;
  2016. ;;; (command "text" "18.7102,16.0825" "0.065" "0" "REVISIONS")
  2017. ;;; (command "text" "16.1087,15.8403" "0.065" "0" "ZONE")
  2018. ;;; (command "text" "16.5801,15.8403" "0.065" "0" "REV")
  2019. ;;; (command "text" "17.8820,15.8403" "0.065" "0" "DESCRIPTION")
  2020. ;;; (command "text" "19.9477,15.8403" "0.065" "0" "DATE")
  2021. ;;; (command "text" "20.7414,15.8403" "0.065" "0" "APPROVED")
  2022. ;;; ;;;
  2023. ;;; (command "text" "mc"  "0.25,2.125"  "0.25" "0" "A")
  2024. ;;; (command "text" "mc"  "0.25,6.375"  "0.25" "0" "B")
  2025. ;;; (command "text" "mc"  "0.25,10.625" "0.25" "0" "C")
  2026. ;;; (command "text" "mc"  "0.25,14.875" "0.25" "0" "D")
  2027. ;;; (command "text" "mc" "21.75,2.125"  "0.25" "0" "A")
  2028. ;;; (command "text" "mc" "21.75,6.375"  "0.25" "0" "B")
  2029. ;;; (command "text" "mc" "21.75,10.625" "0.25" "0" "C")
  2030. ;;; (command "text" "mc" "21.75,14.875" "0.25" "0" "D")
  2031. ;;; ;;;
  2032. ;;; (command "text" "mc" "19.25,0.5"    "0.25" "0" "1")
  2033. ;;; (command "text" "mc" "13.75,0.5"    "0.25" "0" "2")
  2034. ;;; (command "text" "mc"  "8.25,0.5"    "0.25" "0" "3")
  2035. ;;; (command "text" "mc"  "2.75,0.5"    "0.25" "0" "4")
  2036. ;;; ;;;
  2037. ;;; (command "text" "mc" "19.25,16.5"   "0.25" "0" "1")
  2038. ;;; (command "text" "mc" "13.75,16.5"   "0.25" "0" "2")
  2039. ;;; (command "text" "mc"  "8.25,16.5"   "0.25" "0" "3")
  2040. ;;; (command "text" "mc"  "2.75,16.5"   "0.25" "0" "4")
  2041. ;;; END_ITEM
  2042. ;;; 
  2043. ;;; An ANSI - D size sheet with Title block and revision bar.
  2044. ;;; All points are in paperspace units at a scale of 1 inch.
  2045. ;;; 
  2046. ;;; NAME - ANSI-D Size 
  2047. ;;; (command "zoom" "w" "-0.5,-0.5" "34.5,22.5")
  2048. ;;; (command "line" "0,0" "34,0" "34,22" "0,22" "C")
  2049. ;;; (command "line" "1,.5" "33,.5" "33,21.5" "1,21.5" "C")
  2050. ;;; (command "line" "4.25,.125" "4.25,.5" "")
  2051. ;;; (command "array" (entlast) "" "R" "2" "8" "21.375" "4.25")
  2052. ;;; (command "line" ".5,5.5" "1,5.5" "")
  2053. ;;; (command "array" (entlast) "" "R" "3" "2" "5.5" "32.5")
  2054. ;;; ;;;
  2055. ;;; ;;; Bottom microfilm alignment arrow
  2056. ;;; (command "pline" "17,.1" "w" "0.02" "" "17,.3" "")
  2057. ;;; (command "solid" "16.8,.3" "17.2,.3" "17,.5" "" "")
  2058. ;;; ;;; Right microfilm alignment arrow
  2059. ;;; (command "pline" "33.4,11" "w" "0.02" "" "33.4,11" "")
  2060. ;;; (command "solid" "33.2,10.8" "33.2,11.2" "33,11" "" "")
  2061. ;;; ;;; Top microfilm alignment arrow
  2062. ;;; (command "pline" "17,21.9" "w" "0.02" "" "17,21.7" "")
  2063. ;;; (command "solid" "16.8,21.7" "17.2,21.7" "17,21.5" "" "")
  2064. ;;; ;;; Left microfilm alignment arrow
  2065. ;;; (command "pline" ".6,11" "w" "0.02" "" ".8,11" "")
  2066. ;;; (command "solid" ".8,10.8" ".8,11.2" "1,11" "" "")
  2067. ;;; ;;;
  2068. ;;; ;;;
  2069. ;;; ;;; Title block
  2070. ;;; ;;;
  2071. ;;; (command "line" "25.38,.5" "25.38,3" "33,3" "")
  2072. ;;; (command "line" "27.88,.5" "27.88,3" "")
  2073. ;;; (command "line" "27.88,.75" "33,.75" "")
  2074. ;;; (command "line" "25.38,1.25" "33,1.25" "")
  2075. ;;; (command "line" "27.88,2.37" "33,2.37" "")
  2076. ;;; (command "line" "25.38,.875" "27.88,.875" "")
  2077. ;;; ;;;
  2078. ;;; (command "line" "28.87,.5" "28.87,.75" "")
  2079. ;;; (command "line" "31.25,.5" "31.25,.75" "")
  2080. ;;; (command "line" "28.26,.75" "28.26,1.25" "")
  2081. ;;; (command "line" "29.51,.75" "29.51,1.25" "")
  2082. ;;; (command "line" "32.5,.75" "32.5,1.25" "")
  2083. ;;; ;;;
  2084. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2085. ;;; (command "text" "27.9323,0.5925" "0.065" "0" "SCALE")
  2086. ;;; (command "text" "31.3028,0.5925" "0.065" "0" "SHEET")
  2087. ;;; (command "text" "27.9679,1.1359" "0.065" "0" "SIZE")
  2088. ;;; (command "text" "28.3289,1.1359" "0.065" "0" "FSCM NO.")
  2089. ;;; (command "text" "29.5810,1.1359" "0.065" "0" "DWG NO.")
  2090. ;;; (command "text" "32.6405,1.1359" "0.065" "0" "REV")
  2091. ;;; ;;;
  2092. ;;; ;;; Revision bar
  2093. ;;; ;;;
  2094. ;;; ;;; Horizontals
  2095. ;;; (command "line" "26,21.25" "33,21.25" "")
  2096. ;;; (command "line" "26,21" "33,21" "")
  2097. ;;; ;;;
  2098. ;;; ;;; Verticals
  2099. ;;; (command "line" "26,20.4527" "26,21.5" "")
  2100. ;;; (command "line" "26.5,21"  "26.5,21.25" "")
  2101. ;;; (command "line" "26.88,21" "26.88,21.25" "")
  2102. ;;; (command "line" "31.12,21" "31.12,21.25" "")
  2103. ;;; (command "line" "32,21"    "32,21.25" "")
  2104. ;;; ;;;
  2105. ;;; ;;; Revision bar text
  2106. ;;; ;;;
  2107. ;;; (command "text" "29.5746,21.3325" "0.065" "0" "REVISIONS")
  2108. ;;; (command "text" "26.1087,21.0903" "0.065" "0" "ZONE")
  2109. ;;; (command "text" "26.5801,21.0903" "0.065" "0" "REV")
  2110. ;;; (command "text" "28.7464,21.0903" "0.065" "0" "DESCRIPTION")
  2111. ;;; (command "text" "31.4477,21.0903" "0.065" "0" "DATE")
  2112. ;;; (command "text" "32.2477,21.0903" "0.065" "0" "APPROVED")
  2113. ;;; ;;;
  2114. ;;; (command "text" "mc"  "0.5,2.75" "0.25" "0" "A")
  2115. ;;; (command "text" "mc"  "0.5,8.25" "0.25" "0" "B")
  2116. ;;; (command "text" "mc"  "0.5,13.75" "0.25" "0" "C")
  2117. ;;; (command "text" "mc"  "0.5,19.25" "0.25" "0" "D")
  2118. ;;; (command "text" "mc" "33.5,2.75" "0.25" "0" "A")
  2119. ;;; (command "text" "mc" "33.5,8.25" "0.25" "0" "B")
  2120. ;;; (command "text" "mc" "33.5,13.75" "0.25" "0" "C")
  2121. ;;; (command "text" "mc" "33.5,19.25" "0.25" "0" "D")
  2122. ;;; ;;;
  2123. ;;; (command "text" "mc" "2.125,0.25"  "0.25" "0" "8")
  2124. ;;; (command "text" "mc" "6.375,0.25"  "0.25" "0" "7")
  2125. ;;; (command "text" "mc" "10.625,0.25"  "0.25" "0" "6")
  2126. ;;; (command "text" "mc" "14.875,0.25"  "0.25" "0" "5")
  2127. ;;; (command "text" "mc" "19.125,0.25"  "0.25" "0" "4")
  2128. ;;; (command "text" "mc" "23.375,0.25"  "0.25" "0" "3")
  2129. ;;; (command "text" "mc" "27.625,0.25"  "0.25" "0" "2")
  2130. ;;; (command "text" "mc" "31.875,0.25"  "0.25" "0" "1")
  2131. ;;; ;;;
  2132. ;;; (command "text" "mc" "2.125,21.75"  "0.25" "0" "8")
  2133. ;;; (command "text" "mc" "6.375,21.75"  "0.25" "0" "7")
  2134. ;;; (command "text" "mc" "10.625,21.75"  "0.25" "0" "6")
  2135. ;;; (command "text" "mc" "14.875,21.75"  "0.25" "0" "5")
  2136. ;;; (command "text" "mc" "19.125,21.75"  "0.25" "0" "4")
  2137. ;;; (command "text" "mc" "23.375,21.75"  "0.25" "0" "3")
  2138. ;;; (command "text" "mc" "27.625,21.75"  "0.25" "0" "2")
  2139. ;;; (command "text" "mc" "31.875,21.75"  "0.25" "0" "1")
  2140. ;;; END_ITEM
  2141. ;;; 
  2142. ;;; An ANSI - E size sheet with Title block and revision bar.
  2143. ;;; All points are in paperspace units at a scale of 1 inch.
  2144. ;;; 
  2145. ;;; NAME - ANSI-E Size 
  2146. ;;; (command "zoom" "w" "-0.5,-0.5" "44.5,34.5")
  2147. ;;; (command "line" "0,0" "44,0" "44,34" "0,34" "C")
  2148. ;;; (command "line" ".5,1" "43.5,1" "43.5,33" ".5,33" "C")
  2149. ;;; (command "line" "5.5,.5" "5.5,1" "")
  2150. ;;; (command "array" (entlast) "" "R" "2" "8" "32.5" "5.5")
  2151. ;;; (command "line" ".125,4.25" ".5,4.25" "")
  2152. ;;; (command "array" (entlast) "" "R" "7" "2" "4.25" "43.375")
  2153. ;;; ;;;
  2154. ;;; ;;; Bottom microfilm alignment arrow
  2155. ;;; (command "pline" "22,.6" "w" "0.02" "" "22,.8" "")
  2156. ;;; (command "solid" "21.8,.8" "22.2,.8" "22,1" "" "")
  2157. ;;; ;;; Right microfilm alignment arrow
  2158. ;;; (command "pline" "43.9,17" "w" "0.02" "" "43.7,17" "")
  2159. ;;; (command "solid" "43.7,16.8" "43.7,17.2" "43.5,17" "" "")
  2160. ;;; ;;; Top microfilm alignment arrow
  2161. ;;; (command "pline" "22,33.4" "w" "0.02" "" "22,33.2" "")
  2162. ;;; (command "solid" "21.8,33.2" "22.2,33.2" "22,33" "" "")
  2163. ;;; ;;; Left microfilm alignment arrow
  2164. ;;; (command "pline" ".1,17" "w" "0.02" "" ".3,17" "")
  2165. ;;; (command "solid" ".3,16.8" ".3,17.2" ".5,17" "" "")
  2166. ;;; ;;;
  2167. ;;; ;;;
  2168. ;;; ;;; Title block
  2169. ;;; ;;;
  2170. ;;; (command "line" "35.88,1" "35.88,3.5" "43.5,3.5" "")
  2171. ;;; (command "line" "35.88,1.375" "38.38,1.375" "")
  2172. ;;; (command "line" "35.88,1.75" "43.5,1.75" "")
  2173. ;;; (command "line" "38.38,1.25" "43.5,1.25" "")
  2174. ;;; (command "line" "38.38,2.87" "43.5,2.87" "")
  2175. ;;; ;;;
  2176. ;;; (command "line" "38.38,1" "38.38,3.5" "")
  2177. ;;; (command "line" "39.37,1" "39.37,1.25" "")
  2178. ;;; (command "line" "41.75,1" "41.75,1.25" "")
  2179. ;;; (command "line" "38.76,1.25" "38.76,1.75" "")
  2180. ;;; (command "line" "40.01,1.25" "40.01,1.75" "")
  2181. ;;; (command "line" "43,1.25" "43,1.75" "")
  2182. ;;; ;;;
  2183. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2184. ;;; (command "text" "38.4323,1.0925" "0.065" "0" "SCALE")
  2185. ;;; (command "text" "41.8028,1.0925" "0.065" "0" "SHEET")
  2186. ;;; (command "text" "38.4679,1.6359" "0.065" "0" "SIZE")
  2187. ;;; (command "text" "38.8289,1.6359" "0.065" "0" "FSCM NO.")
  2188. ;;; (command "text" "40.0810,1.6359" "0.065" "0" "DWG NO.")
  2189. ;;; (command "text" "43.1405,1.6359" "0.065" "0" "REV")
  2190. ;;; ;;;
  2191. ;;; ;;; Revision bar
  2192. ;;; ;;;
  2193. ;;; ;;; Horizontals
  2194. ;;; (command "line" "36.5,32.75" "43.5,32.75" "")
  2195. ;;; (command "line" "36.5,32.5" "43.5,32.5" "")
  2196. ;;; ;;;
  2197. ;;; ;;; Verticals
  2198. ;;; (command "line" "36.5,31.9527" "36.5,33" "")
  2199. ;;; (command "line" "37,32.5"    "37,32.75" "")
  2200. ;;; (command "line" "37.38,32.5" "37.38,32.75" "")
  2201. ;;; (command "line" "41.62,32.5" "41.62,32.75" "")
  2202. ;;; (command "line" "42.5,32.5"  "42.5,32.75" "")
  2203. ;;; ;;;
  2204. ;;; ;;; Revision bar text
  2205. ;;; ;;;
  2206. ;;; (command "text" "40.0746,32.8325" "0.065" "0" "REVISIONS")
  2207. ;;; (command "text" "36.6087,32.5903" "0.065" "0" "ZONE")
  2208. ;;; (command "text" "37.0801,32.5903" "0.065" "0" "REV")
  2209. ;;; (command "text" "39.2464,32.5903" "0.065" "0" "DESCRIPTION")
  2210. ;;; (command "text" "41.9477,32.5903" "0.065" "0" "DATE")
  2211. ;;; (command "text" "42.7477,32.5903" "0.065" "0" "APPROVED")
  2212. ;;; ;;;
  2213. ;;; (command "text" "mc" "0.25,2.125"  "0.25" "0" "A")
  2214. ;;; (command "text" "mc" "0.25,6.375"  "0.25" "0" "B")
  2215. ;;; (command "text" "mc" "0.25,10.625" "0.25" "0" "C")
  2216. ;;; (command "text" "mc" "0.25,14.875" "0.25" "0" "D")
  2217. ;;; (command "text" "mc" "0.25,19.125" "0.25" "0" "E")
  2218. ;;; (command "text" "mc" "0.25,23.375" "0.25" "0" "F")
  2219. ;;; (command "text" "mc" "0.25,27.625" "0.25" "0" "G")
  2220. ;;; (command "text" "mc" "0.25,31.875" "0.25" "0" "H")
  2221. ;;; ;;;
  2222. ;;; (command "text" "mc" "43.75,2.125"  "0.25" "0" "A")
  2223. ;;; (command "text" "mc" "43.75,6.375"  "0.25" "0" "B")
  2224. ;;; (command "text" "mc" "43.75,10.625" "0.25" "0" "C")
  2225. ;;; (command "text" "mc" "43.75,14.875" "0.25" "0" "D")
  2226. ;;; (command "text" "mc" "43.75,19.125" "0.25" "0" "E")
  2227. ;;; (command "text" "mc" "43.75,23.375" "0.25" "0" "F")
  2228. ;;; (command "text" "mc" "43.75,27.625" "0.25" "0" "G")
  2229. ;;; (command "text" "mc" "43.75,31.875" "0.25" "0" "H")
  2230. ;;; ;;;
  2231. ;;; (command "text" "mc" "2.75,0.5"  "0.25" "0" "8")
  2232. ;;; (command "text" "mc" "8.25,0.5"  "0.25" "0" "7")
  2233. ;;; (command "text" "mc" "13.75,0.5"  "0.25" "0" "6")
  2234. ;;; (command "text" "mc" "19.25,0.5"  "0.25" "0" "5")
  2235. ;;; (command "text" "mc" "24.75,0.5"  "0.25" "0" "4")
  2236. ;;; (command "text" "mc" "30.25,0.5"  "0.25" "0" "3")
  2237. ;;; (command "text" "mc" "35.75,0.5"  "0.25" "0" "2")
  2238. ;;; (command "text" "mc" "41.25,0.5"  "0.25" "0" "1")
  2239. ;;; ;;;
  2240. ;;; (command "text" "mc" "2.75,33.5"  "0.25" "0" "8")
  2241. ;;; (command "text" "mc" "8.25,33.5"  "0.25" "0" "7")
  2242. ;;; (command "text" "mc" "13.75,33.5"  "0.25" "0" "6")
  2243. ;;; (command "text" "mc" "19.25,33.5"  "0.25" "0" "5")
  2244. ;;; (command "text" "mc" "24.75,33.5"  "0.25" "0" "4")
  2245. ;;; (command "text" "mc" "30.25,33.5"  "0.25" "0" "3")
  2246. ;;; (command "text" "mc" "35.75,33.5"  "0.25" "0" "2")
  2247. ;;; (command "text" "mc" "41.25,33.5"  "0.25" "0" "1")
  2248. ;;; END_ITEM
  2249. ;;; 
  2250. ;;; A sample Architectural 24 x 36 sheet with Title block and revision bar.
  2251. ;;; All points are in paperspace units at a scale of 1 inch.
  2252. ;;; 
  2253. ;;; NAME - Arch/Engineering (24 x 36)
  2254. ;;; (command "zoom" "w" "-0.5,-0.5" "36.5,24.5")
  2255. ;;; (command "line" "0,0" "36,0" "36,24" "0,24" "C")
  2256. ;;; ;;; Outer border line
  2257. ;;; (command "pline" ".5,.5" "w" "0.1" "" "35.5,.5" "35.5,23.5" ".5,23.5" "C")
  2258. ;;; (command "fillet" "r" "1")
  2259. ;;; (command "fillet" "p" "l")
  2260. ;;; ;;;
  2261. ;;; ;;; Title block
  2262. ;;; ;;;
  2263. ;;; ;;; Outer border line
  2264. ;;; (command "pline" "31,1" "w" "0.05" "" "35,1" "35,23" "31,23" "C")
  2265. ;;; (command "fillet" "r" ".5")
  2266. ;;; (command "fillet" "p" "l")
  2267. ;;; ;;;
  2268. ;;; ;;; Sheet No. border line
  2269. ;;; (command "pline" "31.25,1.25" "34.75,1.25" "34.75,2.75" "31.25,2.75" "C")
  2270. ;;; (command "fillet" "r" ".25")
  2271. ;;; (command "fillet" "p" "l")
  2272. ;;; ;;;
  2273. ;;; ;;; Project border line
  2274. ;;; (command "pline" "31.25,3" "34.75,3" "34.75,5" "31.25,5" "C")
  2275. ;;; (command "fillet" "p" "l")
  2276. ;;; ;;;
  2277. ;;; ;;; Firm border line
  2278. ;;; (command "pline" "31.25,5.25" "34.75,5.25" "34.75,7.25" "31.25,7.25" "C")
  2279. ;;; (command "fillet" "p" "l")
  2280. ;;; ;;;
  2281. ;;; ;;; Notes/Revisions border line
  2282. ;;; (command "pline" "31.25,7.5" "34.75,7.5" "34.75,22.75" "31.25,22.75" "C")
  2283. ;;; (command "fillet" "p" "l")
  2284. ;;; ;;;
  2285. ;;; ;;; Sheet No. lines
  2286. ;;; (command "pline" "33.25,1.25" "w" "0.025" "" "33.25,2.75" "")
  2287. ;;; (command "pline" "31.25,2.25" "33.25,2.25" "")
  2288. ;;; (command "pline" "31.25,1.75" "33.25,1.75" "")
  2289. ;;; ;;;
  2290. ;;; ;;; Notes/Revisions lines
  2291. ;;; (command "pline" "31.75,7.5"   "31.75,8.625" "")
  2292. ;;; (command "pline" "34.125,7.5"  "34.125,8.625" "")
  2293. ;;; (command "pline" "31.25,7.875" "34.75,7.875" "")
  2294. ;;; (command "pline" "31.25,8.25"  "34.75,8.25" "")
  2295. ;;; (command "pline" "31.25,8.625" "34.75,8.625" "")
  2296. ;;; ;;;
  2297. ;;; (command "pline" "31.25,22.375" "34.75,22.375" "")
  2298. ;;; ;;;
  2299. ;;; ;;; Sheet text
  2300. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2301. ;;; (command "text" "31.4054,7.0711" "0.065" "0" "Firm Name and Address")
  2302. ;;; (command "text" "31.4054,4.8211" "0.065" "0" "Project Name and Address")
  2303. ;;; (command "text" "31.4054,2.5846" "0.065" "0" "Project")
  2304. ;;; (command "text" "33.3899,2.5846" "0.065" "0" "Sheet")
  2305. ;;; (command "text" "31.4054,2.0989" "0.065" "0" "Date")
  2306. ;;; (command "text" "31.4054,1.6132" "0.065" "0" "Scale")
  2307. ;;; ;;;
  2308. ;;; ;;; Revision bar text
  2309. ;;; ;;;
  2310. ;;; (command "text" "mc" "32.9983,22.5578" "0.1" "0" "General Notes")
  2311. ;;; (command "text" "mc" "31.5136,7.7034" "0.1" "0" "No.")
  2312. ;;; (command "text" "mc" "32.9983,7.7034" "0.1" "0" "Revision/Issue")
  2313. ;;; (command "text" "mc" "34.4338,7.7034" "0.1" "0" "Date")
  2314. ;;; ;;;
  2315. ;;; END_ITEM
  2316. ;;; END_DATA
  2317. ;;; 
  2318. ;;; MVIEWS
  2319. ;;; None, 0, 0
  2320. ;;; Single, 1, 1, PLAN
  2321. ;;; Std. Engineering, 2, 2, FRONT, PLAN, RIGHT, ISO
  2322. ;;; Array of Viewports
  2323. ;;; END_MVIEWS
  2324. ;;; 
  2325. ;;; VPSETNAME  - Single
  2326. ;;; (command "mview" ll_crn ur_crn)
  2327. ;;; END_ITEM
  2328. ;;; VPSETNAME  - Std. Engineering
  2329. ;;; END_ITEM
  2330. ;;; VPSETNAME  - Array of Viewports
  2331. ;;; END_ITEM
  2332. ;;; 
  2333. ;;; END_DATA
  2334. ;;; 
  2335.