home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p037 / cr12_5.ddi / R11SUPP.EXE / MVSETUP.LSP < prev    next >
Encoding:
Text File  |  1990-12-03  |  78.9 KB  |  2,339 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.00c")               ; 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.     (if (= str "MVIEWS")
  957.       (setq d_item_list (mv_pfl max_lines 4 "Redisplay"  
  958.         "\n\n\tRedisplay/<Number of entry to load>: "))
  959.       (setq d_item_list (mv_pfl max_lines 4 "Add Redisplay Delete"  
  960.         "\n\n\tAdd/Delete/Redisplay/<Number of entry to load>: "))
  961.     )
  962.     ;; 
  963.     ;; Skip the title block insertion if "None" is selected.
  964.     ;;
  965.     (if (and (= (type d_item_list) 'LIST) (= (car d_item_list) "None"))
  966.       (setq skip T)
  967.       (setq skip nil)
  968.     )
  969.     ;;
  970.     ;; If the Redisplay option is chosen, rewind the file by
  971.     ;; Closing it, opening it again, and seeking to the start
  972.     ;; of the NAMES section again.
  973.     ;;
  974.     (if cont
  975.       (progn
  976.         (if deffi (setq deffi (close deffi)))
  977.         (if (null (setq deffi (mv_lfx mv_xdf "r")))
  978.           (progn
  979.             (princ (strcat "\n\tCouldn't open  " mv_xdf " for reading."))
  980.             (setq cont nil)
  981.           )
  982.         )
  983.       )
  984.     )
  985.   )
  986.   d_item_list
  987. )
  988. ;;;
  989. ;;; Title block insertion
  990. ;;; Check that the drawing exists and if not, look for
  991. ;;; reject the selection.  If there is a definition, then
  992. ;;; execute it and perform the WBLOCK command, then
  993. ;;; insert the resulting block.
  994. ;;;
  995. ;;; mv_tbi == MView_Title_Block_Insertion
  996. ;;;
  997. (defun mv_tbi ()
  998.   ;; 
  999.   ;; a definition in the default file.  If that fails, then  
  1000.   
  1001.   (if (> (length d_item_list) 1) 
  1002.     (if (setq block_name (findfile (nth 1 d_item_list)))
  1003.       (progn
  1004.         (command "insert" block_name "0,0" "" "" "")
  1005.         (command "zoom" "e")
  1006.       )
  1007.       ;; Block named not found;  try to create it...
  1008.       (progn
  1009.         (setq block_name (nth 1 d_item_list))
  1010.         (setq e_last (cdr(assoc -1 (entget(entlast)))))
  1011.         (setq item_name (strcat "NAME - " (nth 0 d_item_list)))
  1012.         (if (mv_rux item_name 1 (strlen item_name))
  1013.           (mv_cfd)
  1014.         )
  1015.         (if (not (eq (cdr(assoc -1 (entget(entlast)))) e_last))
  1016.           (progn
  1017.             (setq sset (ssadd))   ; Create a null selection set.
  1018.             (while (setq e_last (if e_last (entnext e_last) (entnext)))
  1019.               (ssadd e_last sset) ; Add new entities to end of database.
  1020.             )
  1021.             (initget "Yes No")
  1022.             (setq ans (getkword (strcat
  1023.               "\n\tCreate a drawing named " block_name "? <Y>: ")))
  1024.             (if (= ans "No")
  1025.               ;; Then do nothing...
  1026.               (princ)
  1027.               ;; Else...
  1028.               (progn
  1029.                 (command "wblock" block_name "" "0,0" sset "")
  1030.                 (command "insert" block_name "0,0" "" "" "")
  1031.               )
  1032.             )
  1033.           )
  1034.           (progn
  1035.             (princ (strcat
  1036.               "\n\tCouldn't find a definition for block " block_name ". "))
  1037.             ;;(exit)
  1038.           )
  1039.         )
  1040.       )
  1041.     )
  1042.     (progn
  1043.       (setq d_item_list (strcat "NAME - " (nth 0 d_item_list)))
  1044.       (if (mv_rux d_item_list 1 (strlen d_item_list))
  1045.         (mv_cfd)
  1046.       )
  1047.     )
  1048.   )
  1049. )
  1050. ;;;
  1051. ;;; Create the mview viewports.
  1052. ;;;
  1053. ;;; mv_mvi == MView_MView_Insertion
  1054. ;;;
  1055. (defun mv_mvi (/ n_vp_x n_vp_y i_l_len p1 p2)
  1056.   (if (> (length vp_item_list) 0) 
  1057.     (progn
  1058.       (if (> (length vp_item_list) 2) 
  1059.         (setq n_vp_x (nth 1 vp_item_list)
  1060.               n_vp_y (nth 2 vp_item_list)
  1061.         )
  1062.       )
  1063.       (if (> (setq i_l_len (length vp_item_list)) 3) 
  1064.         (setq view_n (- i_l_len 3))  ; Number of views defined.
  1065.       )
  1066.       (setq d_item_name (strcat "VPSETNAME  - " (nth 0 vp_item_list)))
  1067.       (if (mv_rux d_item_name 1 (strlen d_item_name))
  1068.         (progn
  1069.           (mv_gba)                    ; Get bounding area
  1070.           (mv_gnv)                    ; Get number of viewport
  1071.           (mv_gid)                    ; Get interstitial distances
  1072.           (mv_cfp)                    ; Calculate first points
  1073.           (mv_cba)                    ; Check area is on-screen
  1074.           (setvar "osmode" 0)
  1075.           (command "mview" p1 p2)
  1076.           (setq f_vp_n (mv_gvn))      ; Get viewport number
  1077.           (mv_avp)                    ; Array other Mview viewports
  1078.           (setq l_vp_n (mv_gvn))      ; Get viewport number
  1079.           (mv_cav)                    ; Change the view of all viewports
  1080.         )
  1081.       )
  1082.     )
  1083.   )
  1084. )
  1085. ;;;
  1086. ;;; Set the zoom scale factors for a set of viewports.
  1087. ;;;
  1088. ;;; mv_szs == MView_Set_Zoom_Scales
  1089. ;;;
  1090. (defun mv_szs ( / temp)
  1091.   (command "undo" "group")
  1092.   (setq uctr (1+ uctr))
  1093.   (if (/= (getvar "cvport") 1)
  1094.     (command "pspace")
  1095.   )
  1096.   (princ "\n\tSelect the viewports to scale: ")
  1097.   (setq sset (ssget))
  1098.   (if sset
  1099.     (progn
  1100.       (if (> (sslength sset) 1)
  1101.         (progn
  1102.           (initget "Interactively Uniform")
  1103.           (setq ans (getkword (strcat
  1104.             "\n\tSet zoom scale factors for viewports.  "
  1105.             "Interactively/<Uniform>: "))
  1106.           )
  1107.           (if (= ans "Interactively")
  1108.             (setq vp_s_i T)
  1109.             (setq vp_s_i nil)
  1110.           )
  1111.         )
  1112.         (setq vp_s_i nil)
  1113.       )
  1114.       (setq temp (sslength sset)
  1115.             j    0
  1116.       )
  1117.       (if (= (getvar "cvport") 1)
  1118.         (command "mspace")
  1119.       )
  1120.       (while (< j temp)
  1121.         (progn
  1122.           (setq vp_n (cdr(assoc 69 (entget(ssname sset j)))))
  1123.           (setvar "cvport" vp_n)
  1124.           (setq j (1+ j))
  1125.           (if (or vp_s_i (< j 2))
  1126.             (mv_ssi)
  1127.           )
  1128.           (command "zoom" (strcat (mv_sts vp_scale) "xp"))
  1129.         )
  1130.       )
  1131.       (command "pspace")
  1132.     )
  1133.     (princ "\n\tNo viewports selected. ")
  1134.   )
  1135.   (command "undo" "en")
  1136. )
  1137. ;;;
  1138. ;;; Interactively set the scale of each viewport.
  1139. ;;;
  1140. ;;; mv_ssi == MView_Setup_Scale_Interactively
  1141. ;;;
  1142. (defun mv_ssi (/ ans)
  1143.   (princ "\n\tEnter the ratio of paper space units to model space units... ")
  1144.   (initget 6)
  1145.   (setq ans (getreal 
  1146.     "\n\tNumber of paper space units.  <1.0>: ")
  1147.   )
  1148.   (if (= (type ans) 'REAL)
  1149.     (setq vp_scale ans)
  1150.     (setq vp_scale 1.0)
  1151.   )
  1152.   (initget 6)
  1153.   (setq ans (getreal 
  1154.     "\n\tNumber of model space units.  <1.0>: ")
  1155.   )
  1156.   (if (= (type ans) 'REAL)
  1157.     (setq vp_scale (/ vp_scale ans))
  1158.     (setq vp_scale (/ vp_scale 1.0))
  1159.   )
  1160.   vp_scale
  1161. )
  1162. ;;;
  1163. ;;; Set up the scale either interactively or uniformly.
  1164. ;;;
  1165. ;;; mv_sus == MView_Set_Up_Scale
  1166. ;;;
  1167. (defun mv_sus ()
  1168.   (if vp_s_i
  1169.     (mv_ssi)
  1170.   )
  1171.     (setq vp (mv_gvp (+ n vp_n) sset))
  1172.   (command "zoom" (strcat (mv_sts vp_scale) "xp"))
  1173. )
  1174. ;;;
  1175. ;;; Convert a real number to its shortest value; no trailing zeros.
  1176. ;;;
  1177. ;;; mv_sts == MView_Scale_To_String
  1178. ;;;
  1179. (defun mv_sts (num / scale j return)
  1180.   (setq scale (rtos num 2 15)
  1181.         j     0
  1182.   )
  1183.   (while (< j (strlen scale))
  1184.     (if (= (setq return (substr scale (- (strlen scale) j) 1)) "0")
  1185.       (setq j (1+ j))
  1186.       (if (= return ".")
  1187.         (progn
  1188.           (setq return (substr scale 1 (- (strlen scale) (1- j)))) 
  1189.           (setq j (strlen scale))
  1190.         )
  1191.         (progn
  1192.           (setq return (substr scale 1 (- (strlen scale) j))) 
  1193.           (setq j (strlen scale))
  1194.         )
  1195.       )
  1196.     )
  1197.   )
  1198.   return
  1199. )
  1200. ;;;
  1201. ;;; Change to a new plan view and restore.
  1202. ;;;
  1203. ;;; mv_npv == MView_set_New_Plan_View
  1204. ;;;
  1205. (defun mv_npv (ord_1 amnt_1 ord_2 amnt_2)
  1206.   (command "ucs" ord_1 amnt_1)
  1207.   (command "ucs" ord_2 amnt_2)
  1208.   (command "plan" "" )
  1209.   (command "ucs" "p")
  1210.   (command "ucs" "p")
  1211.   (princ)
  1212. )
  1213. ;;;
  1214. ;;;Get the Mview viewport whose number we have in vp_n.
  1215. ;;;
  1216. ;;; mv_gvp == MView_Get_ViewPort
  1217. ;;;
  1218. (defun mv_gvp (num sset / j vp ss_len cont)
  1219.   (setq ss_len (sslength sset)
  1220.         j      0
  1221.         cont   T
  1222.   )
  1223.   (while (and cont (< j ss_len))
  1224.     (if (= (cdr(assoc 69 (setq vp (entget (ssname sset j))))) num)
  1225.       (setq cont nil)
  1226.     )
  1227.     (setq j (1+ j))
  1228.   )
  1229.   vp
  1230. )
  1231. ;;;
  1232. ;;; Change the view into all Mview viewports.
  1233. ;;;
  1234. ;;; mv_cav == MView_Change_All_Views
  1235. ;;;
  1236. (defun mv_cav (/ n sset vp_n vp)
  1237.   (if need_z
  1238.     (command "zoom" "e")
  1239.   )
  1240.   (setq n    0
  1241.         sset (ssget "x" '((0 . "VIEWPORT")))
  1242.         vp_n f_vp_n
  1243.   )
  1244.   (command "mspace")
  1245.   ;;(setvar "cvport" vp_n)
  1246.   ;; While we still have both viewports and view definitions for them...
  1247.   (while (and (< n view_n) (<= (+ n vp_n) l_vp_n))
  1248.     (setvar "cvport" (+ n vp_n))
  1249.     (setq vp (mv_gvp (+ n vp_n) sset))
  1250.     (cond 
  1251.       ((= (nth (+ 3 n) vp_item_list) "PLAN")
  1252.         (command "plan" "")
  1253.         ;;(mv_sus)
  1254.       )
  1255.       ((= (nth (+ 3 n) vp_item_list) "FRONT")
  1256.         (mv_npv "x"  "90" "x"  "0") 
  1257.         ;;(mv_sus)
  1258.       )
  1259.       ((= (nth (+ 3 n) vp_item_list) "RIGHT")
  1260.         (mv_npv "z"  "90" "x" "90")
  1261.         ;;(mv_sus)
  1262.       )
  1263.       ((= (nth (+ 3 n) vp_item_list) "LEFT")
  1264.         (mv_npv "z" "-90" "x" "90")
  1265.         ;;(mv_sus)
  1266.       )
  1267.       ((= (nth (+ 3 n) vp_item_list) "ISO")
  1268.         (command "vpoint" "r" "-45" "30")
  1269.         ;;(mv_sus)
  1270.       )
  1271.       (T
  1272.         (princ "\n\tUndefined view definition in default file. ")
  1273.         (exit)
  1274.       )
  1275.     )
  1276.     (setq n (1+ n))
  1277.   )
  1278.   (command "pspace")
  1279. )
  1280. ;;;
  1281. ;;; Array other Mview viewports.
  1282. ;;;
  1283. ;;; mv_avp == MView_Array_ViewPorts
  1284. ;;;
  1285. (defun mv_avp ( / dx dy)
  1286.   (if (and (> (car mvs_p4) 1) (> (cadr mvs_p4) 1))
  1287.     (progn
  1288.       (setq dx (+ (car mvs_p5)  (car mvs_p3)))
  1289.       (setq dy (+ (cadr mvs_p5)  (cadr mvs_p3)))
  1290.       (command "array" 
  1291.                (entlast) "" 
  1292.                "r" 
  1293.                (cadr mvs_p4)
  1294.                (car mvs_p4) 
  1295.                (+ (cadr mvs_p5) (cadr mvs_p3))
  1296.                (+ (car mvs_p5)  (car mvs_p3))
  1297.       )
  1298.     )
  1299.     (if (> (car mvs_p4) 1)
  1300.       (progn
  1301.         (setq dx (+ (car mvs_p5)  (car mvs_p3)))
  1302.         (command "array" 
  1303.                  (entlast) "" 
  1304.                  "r" 
  1305.                  (cadr mvs_p4)
  1306.                  (car mvs_p4) 
  1307.                  (+ (car mvs_p5)  (car mvs_p3))
  1308.         )
  1309.       )
  1310.       (if (> (cadr mvs_p4) 1)
  1311.         (progn
  1312.           (setq dy (+ (cadr mvs_p5)  (cadr mvs_p3)))
  1313.           (command "array" 
  1314.                    (entlast) "" 
  1315.                    "r" 
  1316.                    (cadr mvs_p4)
  1317.                    (car mvs_p4) 
  1318.                    (+ (cadr mvs_p5) (cadr mvs_p3))
  1319.           )
  1320.         )
  1321.       )
  1322.     )
  1323.   )
  1324. )
  1325. ;;;
  1326. ;;; Get the name of a Mview viewport.
  1327. ;;;
  1328. ;;; mv_gvn == MView_Get_Viewport_Name
  1329. ;;;
  1330. (defun mv_gvn ()
  1331.   (cdr(assoc 69 (entget(entlast))))
  1332. )
  1333. ;;;
  1334. ;;; Calculate the size of the individual viewports from the two
  1335. ;;; corner points, mvs_p1 and mvs_p2, the interstitial distances
  1336. ;;; held in mvs_p3, and the number of viewports held in mvs_p4.
  1337. ;;;
  1338. ;;; mv_cfp == MView_Calculate_First_Points
  1339. ;;;
  1340. (defun mv_cfp (/ x y dx dy )
  1341.   (if (> (car mvs_p1) (car mvs_p2))
  1342.     (setq x (car mvs_p1)
  1343.           mvs_p1 (list (car mvs_p2) (cadr mvs_p1) 0.0)
  1344.           mvs_p2 (list x (cadr mvs_p2) 0.0)
  1345.     )
  1346.   )
  1347.   (if (> (cadr mvs_p1) (cadr mvs_p2))
  1348.     (setq x (cadr mvs_p1)
  1349.           mvs_p1 (list (car mvs_p1) (cadr mvs_p2) 0.0)
  1350.           mvs_p2 (list (car mvs_p2) x 0.0)
  1351.     )
  1352.   )
  1353.   ;; Points are now sorted so that mvs_p1 IS lower left....
  1354.   (setq x  (- (car  mvs_p2) (car  mvs_p1))
  1355.         y  (- (cadr mvs_p2) (cadr mvs_p1))
  1356.         dx (/ (- x (* (1- (car  mvs_p4)) (car  mvs_p3))) (car  mvs_p4))
  1357.         dy (/ (- y (* (1- (cadr mvs_p4)) (cadr mvs_p3))) (cadr mvs_p4))
  1358.         p1 mvs_p1
  1359.         p2 (mapcar '+ p1 (setq mvs_p5  (list dx dy 0)))
  1360.   )
  1361. )
  1362. ;;;
  1363. ;;; Get the number of viewports in X and Y.
  1364. ;;; Sets the global mvs_p4 which is a point containing the X and Y
  1365. ;;; amounts as the (car) and (cadr) of mvs_p4.
  1366. ;;;
  1367. ;;; mv_gnv == MView_Get_Number_of_Viewports_in_x_and_y
  1368. ;;;
  1369. (defun mv_gnv (/ )
  1370.   (if n_vp_x
  1371.     (progn
  1372.       (setq mvs_p4 (list (read n_vp_x) (read n_vp_y) 0))
  1373.     )
  1374.     (progn
  1375.       (setq ans (getint "\n\tNumber of viewports in X. <1>: "))
  1376.       (if (= (type ans) 'INT)
  1377.         (setq mvs_p4 (list ans))
  1378.         (setq mvs_p4 (list 1))
  1379.       )
  1380.       (setq ans (getint "\n\tNumber of viewports in Y. <1>: "))
  1381.       (if (= (type ans) 'INT)
  1382.         (setq mvs_p4 (append mvs_p4 (list ans 0)))
  1383.         (setq mvs_p4 (append mvs_p4 (list 1   0)))
  1384.       )
  1385.     )
  1386.   )
  1387. )
  1388. ;;;
  1389. ;;; Get the horizontal and vertical distances between the viewports.
  1390. ;;; Sets the global mvs_p3 which is a point containing the X and Y
  1391. ;;; interstitial distances as the (car) and (cadr) of mvs_p3.
  1392. ;;;
  1393. ;;; mv_gid == MView_Get_Interstitial_Distances
  1394. ;;;
  1395. (defun mv_gid (/ )
  1396.   (setq mvs_p3 (list 0.0 0.0 0.0))
  1397.   (if (> (car mvs_p4) 1)
  1398.     (progn
  1399.       (setq ans (getdist (strcat 
  1400.         "\n\tDistance between viewports in X. <"
  1401.         (mv_sts (car mvs_p3))
  1402.         ">: ")))
  1403.       (if (= (type ans) 'REAL)
  1404.         (setq mvs_p3 (list ans ans ans))
  1405.       )
  1406.     )
  1407.   )
  1408.   (if (> (cadr mvs_p4) 1)
  1409.     (progn
  1410.       (setq ans (getdist (strcat 
  1411.         "\n\tDistance between viewports in Y. <"
  1412.         (mv_sts (cadr mvs_p3))
  1413.         ">: ")))
  1414.       (if (= (type ans) 'REAL)
  1415.         (setq mvs_p3 (list (car mvs_p3) ans (caddr mvs_p3)))
  1416.       )
  1417.     )
  1418.   )
  1419.   mvs_p3
  1420. )
  1421. ;;;
  1422. ;;; Get set up for creating viewports.
  1423. ;;; Sets the globals mvs_p1 and mvs_p2 which are the corners of the
  1424. ;;; allowable area for viewports in paperspace coordinates.
  1425. ;;;
  1426. ;;; mv_gba == MView_Get_Bounding_Area
  1427. ;;;
  1428. (defun mv_gba (/ )
  1429.   (if ll_crn
  1430.     (initget 1 "Default")
  1431.     (initget 1)
  1432.   )
  1433.   (graphscr)
  1434.   (setq ans (getpoint 
  1435.     (if ll_crn
  1436.       "\n\tBounding area for viewports.  Default/<First point >: "
  1437.       "\n\tBounding area for viewports.  First point: "
  1438.     )
  1439.   ))
  1440.   (if (= ans "Default")
  1441.     (progn
  1442.       (if ll_crn
  1443.         (setq mvs_p1 (read ll_crn)
  1444.               mvs_p2 (read ur_crn)
  1445.         )
  1446.         (progn
  1447.           (princ "\n\tNo default points defined. ")
  1448.           (exit)
  1449.         )
  1450.       )
  1451.     )
  1452.     (progn
  1453.       (initget 1)
  1454.       (setq mvs_p1 ans
  1455.             mvs_p2 (getcorner mvs_p1 "\n\tOther point: ")
  1456.       )
  1457.     )
  1458.   )
  1459. )
  1460. ;;;
  1461. ;;; Check that the corners given are on-screen.  If not, zoom so they are.
  1462. ;;;
  1463. ;;; mv_cba == MView_Check_Bounding_Area
  1464. ;;;
  1465. (defun mv_cba (/ vs vc ss dx dy)
  1466.   (setq vs (getvar "viewsize")
  1467.         vc (getvar "viewctr")
  1468.         ss (getvar "screensize")
  1469.         dx (* vs (/ (car ss) (cadr ss)))
  1470.   ) 
  1471.   (if (or (< (car  mvs_p1) (- (car vc) (/ dx 2.0)))
  1472.           (< (cadr mvs_p1) (- (cadr vc) (/ vs 2.0)))
  1473.           (> (car  mvs_p2) (+ (car vc) (/ dx 2.0)))
  1474.           (> (cadr mvs_p2) (+ (cadr vc) (/ vs 2.0)))
  1475.       )
  1476.     (setq need_z T)
  1477.   )          
  1478. )
  1479. ;;;
  1480. ;;; Create a title block or Mview viewport layout from the code in the 
  1481. ;;; default file.  This may be anything from inserting a block to actually 
  1482. ;;; drawing every  component of the title block from scratch.  Any 
  1483. ;;; single-line valid Lisp expression may be written in the default file 
  1484. ;;; after the DATA name.
  1485. ;;;
  1486. ;;; mv_cfd == MView_Create_From_Defaults
  1487. ;;;
  1488. (defun mv_cfd (/ cont theCmd)
  1489.   (setq cont T)
  1490.   (while cont
  1491.     (setq theCmd (mv_rpl))
  1492.     (if (= (substr theCmd 1 8) "END_ITEM")
  1493.       (progn
  1494.         (setq cont nil)
  1495.       )
  1496.       (mv_etl theCmd)
  1497.     )
  1498.   )
  1499. )
  1500. ;;;
  1501. ;;; Evaluate the line or string passed in.
  1502. ;;;
  1503. ;;; mv_etl == MView_Evaluate_The_Line
  1504. ;;;
  1505. (defun mv_etl (str / )
  1506.   ;(princ str)(terpri)
  1507.   (if (eval(read str)) T nil)
  1508. )
  1509. ;;;
  1510. ;;; Read and parse out a line of the Lisp code found in the defaults
  1511. ;;; file.  This must be done so that literal strings may be written
  1512. ;;; directly in the defaults file, without having to escape all of them.
  1513. ;;; We will do the escaping here, if necessary.
  1514. ;;; 
  1515. ;;; Return the escaped string
  1516. ;;;
  1517. ;;; mv_rpl == MView_Read_and_Parse_a_Line
  1518. ;;;
  1519. (defun mv_rpl ( / line j k sl str)
  1520.   (if (setq line (read-line deffi))
  1521.     (progn
  1522.       (setq j 1 k 1 sl (strlen line) str "")
  1523.       (while (<= j sl)
  1524.         (if (= (setq sb_str (substr line j k)) "\"")
  1525.           (setq str (strcat str "\""))
  1526.           (setq str (strcat str sb_str))
  1527.         )
  1528.         (setq j (1+ j))
  1529.       )
  1530.     )
  1531.     (progn
  1532.       (princ "\n\tNo lines left to read. ")
  1533.       (exit)
  1534.     )
  1535.   )
  1536.   str
  1537. )
  1538. ;;;
  1539. ;;; Create a default definitions file in the current directory
  1540. ;;; Read it out of this file (mvsetup.lsp) at the end of the file.
  1541. ;;;
  1542. ;;; mv_cdf == MView_Create_Defaults_File
  1543. ;;;
  1544. (defun mv_cdf (/ deffi deffo cont line)
  1545.   ;; The default file name for mvsetup is "mvsetup.dfs".
  1546.   ;; Look for it in AutoCAD's search paths
  1547.   ;;
  1548.   (if (setq deffi (mv_lfx "mvsetup.lsp" "r"))
  1549.     (if (setq deffo (mv_lfx mv_xdf "w"))
  1550.       (progn
  1551.         (setq cont T)
  1552.         (while cont
  1553.           (setq line (read-line deffi))
  1554.           ;; Seek to the start of the default file definition
  1555.           (if (= (substr line 1 13) ";;; Start DDF")
  1556.             (setq cont nil)
  1557.           )
  1558.         )
  1559.         ;; Start writing the file
  1560.         ;; Throw away the first four characters of each line to the EOF.
  1561.         
  1562.         (while (setq line (read-line deffi))
  1563.           ;; Seek to the start of the default file definition
  1564.           (write-line (substr line 5) deffo)
  1565.         )
  1566.         (setq deffi (close deffi))
  1567.         (setq deffo (close deffo))
  1568.       )
  1569.       (princ (strcat "\nError opening " mv_xdf " for writing. "))
  1570.     )
  1571.     (princ (strcat "\nError opening " mv_xlf " for reading. "))
  1572.   )
  1573. )
  1574. ;;;
  1575. ;;; Look for an external definitions file in AutoCAD's search path
  1576. ;;;
  1577. ;;; mv_lfx == MView_Look_For_eXternal_file
  1578. ;;;
  1579. (defun mv_lfx (f_name r_or_w / lfile)
  1580.   ;; Look for f_name in AutoCAD's search paths.
  1581.   (if (= r_or_w "w")
  1582.     (if (setq temp (open f_name r_or_w))
  1583.       temp                            ; Return file descriptor
  1584.       (progn
  1585.         (princ (strcat "\n\tCouldn't open " f_name " for writing. "))
  1586.         (exit)
  1587.       )
  1588.     )
  1589.     (if (setq lfile (findfile f_name))
  1590.       (if (setq temp (open lfile r_or_w))
  1591.         temp                          ; Return file descriptor
  1592.         (progn
  1593.           (princ (strcat "\n\tCouldn't open " f_name " for reading. "))
  1594.           (exit)
  1595.         )
  1596.       )
  1597.       nil                             ; or nil
  1598.     )
  1599.   )
  1600. )
  1601. ;;;
  1602. ;;; Change an existing setup, including the titleblock and/or viewports
  1603. ;;;
  1604. ;;; mv_coc == MView_Change_Or_Create?
  1605. ;;;
  1606. (defun mv_coc ()
  1607.   (initget "Create Update")
  1608.   (setq ans (getkword "\n\tUpdate current setup/<Create>: "))
  1609.   (if (= ans "Update")
  1610.     -1                                ; Return -1
  1611.      1                                ; Return  1
  1612.   )
  1613. )
  1614. ;;;
  1615. ;;; Do the old Release 10 setup -- we are in Release 10 mode.
  1616. ;;;
  1617. ;;; mv_ == MView_
  1618. ;;;
  1619. (defun mv_dos (/ temp xl yl)
  1620.  
  1621.   (princ "\n\tTILEMODE is set to 1;  cannot set up paperspace/modelspace")
  1622.   (princ "\n\tviewports unless TILEMODE is set to 0.  Release 10 setup: \n")
  1623.   
  1624.   (menucmd "S=UNITS")
  1625.        
  1626.   (initget 7)                         ; No null input, negative or zero values
  1627.  
  1628.   (setq temp (getint "\n\tSelect the Units from the screen menu: "))
  1629.   (menucmd (strcat "S=U" (itoa temp)))
  1630.  
  1631.   (setq mv_olu (getvar "lunits"))     ; Store current linear units setting
  1632.   (if (= temp 5)                      ; Set linear units to new value
  1633.     (setvar "lunits" 2)               ; If metric
  1634.     (setvar "lunits" temp)            ; otherwise
  1635.   )                                   
  1636.   
  1637.   (initget 5)                         ; 0 ok, but no null or negative values
  1638.  
  1639.   (setq mv_sc (getreal "\n\tSelect the Scale from the screen menu: "))
  1640.   (cond
  1641.     ((= mv_sc 0)
  1642.       (progn
  1643.        (initget 7)              
  1644.        (setq mv_sc (getreal "\n\tEnter the scale: "))
  1645.        (setq mv_sc (float mv_sc))
  1646.       )
  1647.     )
  1648.   )
  1649.   (cond
  1650.     ((= temp 5)
  1651.       (menucmd "S=METRIC")
  1652.     )
  1653.     (T
  1654.       (menucmd "S=ENGLISH")
  1655.     )
  1656.   )
  1657.   (initget 5)                         ; 0 ok, but no null or negative values
  1658.   (setq xl (getdist "\n\tSelect the Paper size from the screen menu: "))
  1659.   (initget 5)                         ; 0 ok, but no null or negative values
  1660.   (setq yl (getdist))
  1661.   (cond
  1662.     ((= xl 0)
  1663.       (progn
  1664.        (initget 7)                    ; No null, negative or zero values
  1665.        (setq xl (getdist "\n\tEnter the Horizontal Dimension of the paper: "))
  1666.        (initget 7)                    ; No null, negative or zero values
  1667.        (setq yl (getdist "\n\tEnter the Vertical Dimension of the paper: "))
  1668.       )
  1669.     )
  1670.   )
  1671.   (setq xl (* mv_sc xl) 
  1672.         yl (* mv_sc yl)
  1673.   )
  1674.   (command
  1675.     "limits" "0,0" (list xl yl)
  1676.     "pline" "0,0" (list 0 yl) (list xl yl) (list xl 0) "0,0" "c"
  1677.     "zoom" "a"
  1678.   )
  1679.   (menucmd "S=")
  1680.   (menucmd "S=")
  1681.   (menucmd "S=")
  1682. )
  1683. ;;;
  1684. ;;; C: function definition.
  1685. ;;;
  1686. (defun c:mvs () (vmon)(mv_sup))
  1687. (defun c:mvsetup () (vmon)(mv_sup))
  1688. (princ "\n\tC:MVSetup loaded.  Type MVS or MVSETUP to set up your drawing.")
  1689. (princ)
  1690.  
  1691. ;;;
  1692. ;;; The rest of this file in source form is the default file.  When creating
  1693. ;;; a default file, each line following the line which contains "Start DDF"
  1694. ;;; is read and written to the default file minus its first four characters.
  1695. ;;; 
  1696. ;;; This file contains definitions for ANSI A through E size title block 
  1697. ;;; sheets and several viewport setup options.  If this file is ever 
  1698. ;;; Kelvinated or protected, then this section should be stripped out and 
  1699. ;;; shipped separately.  Some code changes would also be required.
  1700. ;;;
  1701.  
  1702. ;;; Start DDF
  1703. ;;; ;;; Do NOT erase or change the first three lines
  1704. ;;; ;;; Version 1.0 -- (c) Autodesk, Inc.  26 February 1990
  1705. ;;; ;;; MetaView Setup Defaults
  1706. ;;; ;;; This file contains sets of defaults for setting up multiple viewport
  1707. ;;; ;;; configurations in Paperspace in Release 11 of AutoCAD.  It is intended
  1708. ;;; ;;; that you modify the entries given here to create your own customized
  1709. ;;; ;;; versions.  The format of the file is as follows:
  1710. ;;; ;;; 
  1711. ;;; ;;; The first part of the file is a list of the NAME's of the entries 
  1712. ;;; ;;; followed by an END_NAMES delimiter.
  1713. ;;; ;;; 
  1714. ;;; ;;; Each of the names may have optional, comma delimited fields in the
  1715. ;;; ;;; following order:  the first optional field is the file/path name of
  1716. ;;; ;;; an AutoCAD drawing which is to be inserted at the local UCS origin
  1717. ;;; ;;; when the name is selected, followed by a window in paperspace units
  1718. ;;; ;;; which represents the extents (in paperspace) of the usable paper
  1719. ;;; ;;; area.  This is the area which may be automatically filled with 
  1720. ;;; ;;; viewports.
  1721. ;;; ;;; 
  1722. ;;; ;;; The data portion of the file for any NAME entry is of arbitrary 
  1723. ;;; ;;; length, and contains lines of AutoLISP code with all coordinates 
  1724. ;;; ;;; in Paperspace units.  It is terminated with END_DATA.
  1725. ;;; ;;; 
  1726. ;;; ;;; Lines of AutoLisp code cannot be split across multiple lines.
  1727. ;;; ;;; 
  1728. ;;; ;;; Lines may be commented out with ";".
  1729. ;;; 
  1730. ;;; NAMES
  1731. ;;; None
  1732. ;;; ANSI-V Size    ,ansi-v.dwg,(0.505 2.125 0.0),(7.995 9.5777 0.0)
  1733. ;;; ANSI-A Size    ,ansi-a.dwg,(0.375 2.255 0.0),(10.625 6.9477 0.0)
  1734. ;;; ANSI-B Size    ,ansi-b.dwg,(0.745 0.505 0.0),(10.005 10.495 0.0)
  1735. ;;; ANSI-C Size    ,ansi-c.dwg,(0.625 0.875 0.0),(15.125 16.125 0.0)
  1736. ;;; ANSI-D Size    ,ansi-d.dwg,(1.125 0.625 0.0),(25.255 21.375 0.0)
  1737. ;;; ANSI-E Size    ,ansi-e.dwg,(0.625 1.125 0.0),(35.755 32.875 0.0)
  1738. ;;; Arch/Engineering (24 x 36) ,arch-a.dwg,(1.0 1.0 0.0),(30.5 23.0 0.0)
  1739. ;;; END_NAMES
  1740. ;;; 
  1741. ;;; DATA
  1742. ;;; 
  1743. ;;; NAME - None
  1744. ;;; (princ)                 
  1745. ;;; END_ITEM
  1746. ;;; 
  1747. ;;; An ANSI - A size Vertical sheet with Title block and revision bar.
  1748. ;;; All points are in paperspace units at a scale of 1 inch.
  1749. ;;; 
  1750. ;;; NAME - ANSI-V Size 
  1751. ;;; (command "zoom" "w" "-0.5,-0.5" "9.0,11.5")
  1752. ;;; (command "line" "0,0" "8.5,0" "8.5,11" "0,11" "C")
  1753. ;;; (command "line" ".38,.25" "8.12,.25" "8.12,10.75" ".38,10.75" "C")
  1754. ;;; ;;; Bottom microfilm alignment arrow
  1755. ;;; (command "pline" "4.25,0" "w" "0.02" "" "4.25,.1" "")
  1756. ;;; (command "solid" "4.1,.1" "4.4,.1" "4.25,.25" "" "")
  1757. ;;; ;;; Right microfilm alignment arrow
  1758. ;;; (command "pline" "8.37,5.5" "w" "0.02" "" "8.27,5.5" "")
  1759. ;;; (command "solid" "8.27,5.35" "8.27,5.65" "8.12,5.5" "" "")
  1760. ;;; ;;; Top microfilm alignment arrow
  1761. ;;; (command "pline" "4.25,11" "w" "0.02" "" "4.25,10.9" "")
  1762. ;;; (command "solid" "4.1,10.9" "4.4,10.9" "4.25,10.75" "" "")
  1763. ;;; ;;; Left microfilm alignment arrow
  1764. ;;; (command "pline" ".13,5.5" "w" "0.02" "" ".23,5.5" "")
  1765. ;;; (command "solid" ".23,5.35" ".23,5.65" ".38,5.5" "" "")
  1766. ;;; ;;;
  1767. ;;; ;;; Title block
  1768. ;;; ;;;
  1769. ;;; ;;; Horizontals
  1770. ;;; (command "line" "1.87,0.25" "1.87,2"    "8.12,2" "")
  1771. ;;; (command "line" "1.87,.565" "3.87,.565" "")
  1772. ;;; (command "line" "1.87,.88"  "8.12,.88"  "")
  1773. ;;; (command "line" "3.87,.5"   "8.12,.5"   "")
  1774. ;;; (command "line" "3.87,1.5"  "8.12,1.5"  "")
  1775. ;;; ;;;
  1776. ;;; ;;; Verticals
  1777. ;;; (command "line" "3.87,0.25" "3.87,2"  "")
  1778. ;;; (command "line" "4.87,.25"  "4.87,.5"  "")
  1779. ;;; (command "line" "6.37,.25"  "6.37,.5"  "")
  1780. ;;; (command "line" "4.25,.5"   "4.25,.88" "")
  1781. ;;; (command "line" "5.37,.5"   "5.37,.88" "")
  1782. ;;; (command "line" "7.74,.5"   "7.74,.88" "")
  1783. ;;; ;;;
  1784. ;;; ;;; Text
  1785. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1786. ;;; (command "text" "3.9223,.3425" "0.065" "0" "SCALE")
  1787. ;;; (command "text" "6.4228,.3425" "0.065" "0" "SHEET")
  1788. ;;; (command "text" "3.9579,.7659" "0.065" "0" "SIZE")
  1789. ;;; (command "text" "4.3189,.7659" "0.065" "0" "FSCM NO.")
  1790. ;;; (command "text" "5.4410,.7659" "0.065" "0" "DWG NO.")
  1791. ;;; (command "text" "7.8205,.7659" "0.065" "0" "REV")
  1792. ;;; ;;;
  1793. ;;; ;;; Revision bar
  1794. ;;; ;;;
  1795. ;;; ;;; Horizontals
  1796. ;;; (command "line" "2.62,10.5" "8.12,10.5" "")
  1797. ;;; (command "line" "2.62,10.25" "8.12,10.25" "")
  1798. ;;; ;;;
  1799. ;;; ;;; Verticals
  1800. ;;; (command "line" "2.62,10.75" "2.62,9.7027" "")
  1801. ;;; (command "line" "3.12,10.25" "3.12,10.5" "")
  1802. ;;; (command "line" "3.50,10.25" "3.50,10.5" "")
  1803. ;;; (command "line" "6.24,10.25" "6.24,10.5" "")
  1804. ;;; (command "line" "7.12,10.25" "7.12,10.5" "")
  1805. ;;; ;;;
  1806. ;;; ;;; Revision bar text
  1807. ;;; ;;;
  1808. ;;; (command "text" "5.3302,10.5825" "0.065" "0" "REVISIONS")
  1809. ;;; (command "text" "2.7287,10.3403" "0.065" "0" "ZONE")
  1810. ;;; (command "text" "3.2001,10.3403" "0.065" "0" "REV")
  1811. ;;; (command "text" "4.5020,10.3403" "0.065" "0" "DESCRIPTION")
  1812. ;;; (command "text" "6.5677,10.3403" "0.065" "0" "DATE")
  1813. ;;; (command "text" "7.3614,10.3403" "0.065" "0" "APPROVED")
  1814. ;;; END_ITEM
  1815. ;;; 
  1816. ;;; An ANSI - A size sheet with Title block and revision bar.
  1817. ;;; All points are in paperspace units at a scale of 1 inch.
  1818. ;;; 
  1819. ;;; NAME - ANSI-A Size 
  1820. ;;; (command "zoom" "w" "-0.5,-0.5" "11.5,9.0")
  1821. ;;; (command "line" "0,0" "11,0" "11,8.5" "0,8.5" "C")
  1822. ;;; (command "line" ".25,.38" "10.75,.38" "10.75,8.12" ".25,8.12" "C")
  1823. ;;; ;;; Bottom microfilm alignment arrow
  1824. ;;; (command "pline" "5.5,.13" "w" "0.02" "" "5.5,.23" "")
  1825. ;;; (command "solid" "5.35,.23" "5.65,.23" "5.5,.38" "" "")
  1826. ;;; ;;; Right microfilm alignment arrow
  1827. ;;; (command "pline" "11,4.25" "w" "0.02" "" "10.9,4.25" "")
  1828. ;;; (command "solid" "10.9,4.1" "10.9,4.4" "10.75,4.25" "" "")
  1829. ;;; ;;; Top microfilm alignment arrow
  1830. ;;; (command "pline" "5.5,8.37" "w" "0.02" "" "5.5,8.27" "")
  1831. ;;; (command "solid" "5.35,8.27" "5.65,8.27" "5.5,8.12" "" "")
  1832. ;;; ;;; Left microfilm alignment arrow
  1833. ;;; (command "pline" "0,4.25" "w" "0.02" "" ".1,4.25" "")
  1834. ;;; (command "solid" ".1,4.1" ".1,4.4" ".25,4.25" "" "")
  1835. ;;; ;;;
  1836. ;;; ;;; Title block
  1837. ;;; ;;;
  1838. ;;; ;;; Horizontals
  1839. ;;; (command "line" "4.5,.38"   "4.5,2.13"   "10.75,2.13" "")
  1840. ;;; (command "line" "4.5,.695"  "6.5,.695"   "")
  1841. ;;; (command "line" "4.5,1.01"  "10.75,1.01" "")
  1842. ;;; (command "line" "6.5,.63"   "10.75,.63"  "")
  1843. ;;; (command "line" "6.5,1.63"  "10.75,1.63" "")
  1844. ;;; ;;;
  1845. ;;; ;;; Verticals
  1846. ;;; (command "line" "6.5,0.38" "6.5,2.13"  "")
  1847. ;;; (command "line" "7.5,.38"   "7.5,.63"    "")
  1848. ;;; (command "line" "9.0,.38"   "9.0,.63"    "")
  1849. ;;; (command "line" "6.88,.63"  "6.88,1.01"  "")
  1850. ;;; (command "line" "8,.63"     "8,1.01"     "")
  1851. ;;; (command "line" "10.37,.63" "10.37,1.01" "")
  1852. ;;; ;;;
  1853. ;;; ;;; Text
  1854. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1855. ;;; (command "text" "6.5523,0.4725" "0.065" "0" "SCALE")
  1856. ;;; (command "text" "9.0528,0.4725" "0.065" "0" "SHEET")
  1857. ;;; (command "text" "6.5879,0.8959" "0.065" "0" "SIZE")
  1858. ;;; (command "text" "6.9489,0.8959" "0.065" "0" "FSCM NO.")
  1859. ;;; (command "text" "8.0710,0.8959" "0.065" "0" "DWG NO.")
  1860. ;;; (command "text" "10.4505,0.8959" "0.065" "0" "REV")
  1861. ;;; ;;;
  1862. ;;; ;;; Revision bar
  1863. ;;; ;;;
  1864. ;;; ;;; Horizontals
  1865. ;;; (command "line" "5.25,7.87" "10.75,7.87" "")
  1866. ;;; (command "line" "5.25,7.62" "10.75,7.62" "")
  1867. ;;; ;;;
  1868. ;;; ;;; Verticals
  1869. ;;; (command "line" "5.25,8.12" "5.25,7.0727" "")
  1870. ;;; (command "line" "5.75,7.62" "5.75,7.87" "")
  1871. ;;; (command "line" "6.13,7.62" "6.13,7.87" "")
  1872. ;;; (command "line" "8.87,7.62" "8.87,7.87" "")
  1873. ;;; (command "line" "9.75,7.62" "9.75,7.87" "")
  1874. ;;; ;;;
  1875. ;;; ;;; Revision bar text
  1876. ;;; ;;;
  1877. ;;; (command "text" "7.9602,7.9525" "0.065" "0" "REVISIONS")
  1878. ;;; (command "text" "5.3587,7.7103" "0.065" "0" "ZONE")
  1879. ;;; (command "text" "5.8301,7.7103" "0.065" "0" "REV")
  1880. ;;; (command "text" "7.1320,7.7103" "0.065" "0" "DESCRIPTION")
  1881. ;;; (command "text" "9.1977,7.7103" "0.065" "0" "DATE")
  1882. ;;; (command "text" "9.9914,7.7103" "0.065" "0" "APPROVED")
  1883. ;;; END_ITEM
  1884. ;;; 
  1885. ;;; An ANSI - B size sheet with Title block and revision bar.
  1886. ;;; All points are in paperspace units at a scale of 1 inch.
  1887. ;;; 
  1888. ;;; NAME - ANSI-B Size 
  1889. ;;; (command "zoom" "w" "-0.5,-0.5" "17.5,11.5")
  1890. ;;; (command "line" "0,0" "17,0" "17,11" "0,11" "C")
  1891. ;;; (command "line" ".62,.38" "16.38,.38" "16.38,10.62" ".62,10.62" "C")
  1892. ;;; ;;; Bottom microfilm alignment arrow
  1893. ;;; (command "pline" "8.5,.13" "w" "0.02" "" "8.5,.23" "")
  1894. ;;; (command "solid" "8.35,.23" "8.65,.23" "8.5,.38" "" "")
  1895. ;;; ;;; Right microfilm alignment arrow
  1896. ;;; (command "pline" "16.62,5.5" "w" "0.02" "" "16.52,5.5" "")
  1897. ;;; (command "solid" "16.52,5.35" "16.52,5.65" "16.38,5.5" "" "")
  1898. ;;; ;;; Top microfilm alignment arrow
  1899. ;;; (command "pline" "8.5,10.87" "w" "0.02" "" "8.5,10.77" "")
  1900. ;;; (command "solid" "8.35,10.77" "8.65,10.77" "8.5,10.62" "" "")
  1901. ;;; ;;; Left microfilm alignment arrow
  1902. ;;; (command "pline" ".38,5.5" "w" "0.02" "" ".48,5.5" "")
  1903. ;;; (command "solid" ".48,5.35" ".48,5.65" ".62,5.5" "" "")
  1904. ;;; ;;;
  1905. ;;; ;;; Title block
  1906. ;;; ;;;
  1907. ;;; ;;; Horizontals
  1908. ;;; (command "line" "10.13,.38"   "10.13,2.13"   "16.38,2.13" "")
  1909. ;;; (command "line" "10.13,.695"  "12.13,.695"   "")
  1910. ;;; (command "line" "10.13,1.01"  "16.38,1.01" "")
  1911. ;;; (command "line" "12.13,.63"   "16.38,.63"  "")
  1912. ;;; (command "line" "12.13,1.63"  "16.38,1.63" "")
  1913. ;;; ;;;
  1914. ;;; ;;; Verticals
  1915. ;;; (command "line" "12.13,0.38" "12.13,2.13"  "")
  1916. ;;; (command "line" "13.13,.38" "13.13,.63"   "")
  1917. ;;; (command "line" "14.63,.38" "14.63,.63"   "")
  1918. ;;; (command "line" "12.51,.63" "12.51,1.01"  "")
  1919. ;;; (command "line" "13.63,.63" "13.63,1.01"  "")
  1920. ;;; (command "line" "16,.63"    "16,1.01"     "")
  1921. ;;; ;;;
  1922. ;;; ;;; Text
  1923. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1924. ;;; (command "text" "12.1823,0.4725" "0.065" "0" "SCALE")
  1925. ;;; (command "text" "14.6828,0.4725" "0.065" "0" "SHEET")
  1926. ;;; (command "text" "12.2179,0.8959" "0.065" "0" "SIZE")
  1927. ;;; (command "text" "12.5789,0.8959" "0.065" "0" "FSCM NO.")
  1928. ;;; (command "text" "13.7010,0.8959" "0.065" "0" "DWG NO.")
  1929. ;;; (command "text" "16.0805,0.8959" "0.065" "0" "REV")
  1930. ;;; ;;;
  1931. ;;; ;;; Revision bar
  1932. ;;; ;;;
  1933. ;;; ;;; Horizontals
  1934. ;;; (command "line" "10.88,10.37" "16.38,10.37" "")
  1935. ;;; (command "line" "10.88,10.12" "16.38,10.12" "")
  1936. ;;; ;;;
  1937. ;;; ;;; Verticals
  1938. ;;; (command "line" "10.88,10.62" "10.88,9.5727" "")
  1939. ;;; (command "line" "11.38,10.12" "11.38,10.37" "")
  1940. ;;; (command "line" "11.76,10.12" "11.76,10.37" "")
  1941. ;;; (command "line" "14.5,10.12" "14.5,10.37" "")
  1942. ;;; (command "line" "15.38,10.12" "15.38,10.37" "")
  1943. ;;; ;;;
  1944. ;;; ;;; Revision bar text
  1945. ;;; ;;;
  1946. ;;; (command "text" "13.5902,10.4525" "0.065" "0" "REVISIONS")
  1947. ;;; (command "text" "10.9887,10.2103" "0.065" "0" "ZONE")
  1948. ;;; (command "text" "11.4601,10.2103" "0.065" "0" "REV")
  1949. ;;; (command "text" "12.7620,10.2103" "0.065" "0" "DESCRIPTION")
  1950. ;;; (command "text" "14.8277,10.2103" "0.065" "0" "DATE")
  1951. ;;; (command "text" "15.6214,10.2103" "0.065" "0" "APPROVED")
  1952. ;;; END_ITEM
  1953. ;;; 
  1954. ;;; An ANSI - C size sheet with Title block and revision bar.
  1955. ;;; All points are in paperspace units at a scale of 1 inch.
  1956. ;;; 
  1957. ;;; NAME - ANSI-C Size 
  1958. ;;; (command "zoom" "w" "-0.5,-0.5" "22.5,17.5")
  1959. ;;; (command "line" "0,0" "22,0" "22,17" "0,17" "C")
  1960. ;;; (command "line" ".5,.75" "21.5,.75" "21.5,16.25" ".5,16.25" "C")
  1961. ;;; (command "line" "5.5,0.375" "5.5,0.75" "")
  1962. ;;; (command "array" (entlast) "" "R" "2" "2" "15.875" "11")
  1963. ;;; (command "line" "0.125,4.25" "0.5,4.25" "")
  1964. ;;; (command "array" (entlast) "" "R" "2" "2" "8.5" "21.375")
  1965. ;;; ;;;
  1966. ;;; ;;; Bottom microfilm alignment arrow
  1967. ;;; (command "pline" "11,.5" "w" "0.02" "" "11,.6" "")
  1968. ;;; (command "solid" "10.85,.6" "11.15,.6" "11,.75" "" "")
  1969. ;;; ;;; Right microfilm alignment arrow
  1970. ;;; (command "pline" "21.75,8.5" "w" "0.02" "" "21.65,8.5" "")
  1971. ;;; (command "solid" "21.65,8.35" "21.65,8.65" "21.5,8.5" "" "")
  1972. ;;; ;;; Top microfilm alignment arrow
  1973. ;;; (command "pline" "11,16.5" "w" "0.02" "" "11,16.4" "")
  1974. ;;; (command "solid" "10.85,16.4" "11.15,16.4" "11,16.25" "" "")
  1975. ;;; ;;; Left microfilm alignment arrow
  1976. ;;; (command "pline" ".25,8.5" "w" "0.02" "" ".35,8.5" "")
  1977. ;;; (command "solid" ".35,8.35" ".35,8.65" ".5,8.5" "" "")
  1978. ;;; ;;;
  1979. ;;; ;;; Title block
  1980. ;;; ;;;
  1981. ;;; ;;; Horizontals
  1982. ;;; (command "line" "15.25,0.75"   "15.25,2.5"   "21.50,2.5" "")
  1983. ;;; (command "line" "15.25,1.065"  "17.25,1.065"   "")
  1984. ;;; (command "line" "15.25,1.38"  "21.5,1.38" "")
  1985. ;;; (command "line" "17.25,1"   "21.5,1"  "")
  1986. ;;; (command "line" "17.25,2"  "21.5,2" "")
  1987. ;;; ;;;
  1988. ;;; ;;; Verticals
  1989. ;;; (command "line" "17.25,0.75" "17.25,2.5"  "")
  1990. ;;; (command "line" "18.25,0.75" "18.25,1"    "")
  1991. ;;; (command "line" "19.75,0.75" "19.75,1"    "")
  1992. ;;; (command "line" "17.63,1"    "17.63,1.38" "")
  1993. ;;; (command "line" "18.75,1"    "18.75,1.38" "")
  1994. ;;; (command "line" "21.12,1"    "21.12,1.38" "")
  1995. ;;; ;;;
  1996. ;;; ;;; Text
  1997. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  1998. ;;; (command "text" "17.3023,0.8425" "0.065" "0" "SCALE")
  1999. ;;; (command "text" "19.8028,0.8425" "0.065" "0" "SHEET")
  2000. ;;; (command "text" "17.3379,1.2659" "0.065" "0" "SIZE")
  2001. ;;; (command "text" "17.6989,1.2659" "0.065" "0" "FSCM NO.")
  2002. ;;; (command "text" "18.8210,1.2659" "0.065" "0" "DWG NO.")
  2003. ;;; (command "text" "21.2005,1.2659" "0.065" "0" "REV")
  2004. ;;; ;;;
  2005. ;;; ;;; Revision bar
  2006. ;;; ;;;
  2007. ;;; ;;; Horizontals
  2008. ;;; (command "line" "16,16" "21.5,16" "")
  2009. ;;; (command "line" "16,15.75" "21.5,15.75" "")
  2010. ;;; ;;;
  2011. ;;; ;;; Verticals
  2012. ;;; (command "line" "16,16.25" "16,15.2027" "")
  2013. ;;; (command "line" "16.5,15.75" "16.5,16" "")
  2014. ;;; (command "line" "16.88,15.75" "16.88,16" "")
  2015. ;;; (command "line" "19.62,15.75" "19.62,16" "")
  2016. ;;; (command "line" "20.5,15.75" "20.5,16" "")
  2017. ;;; ;;;
  2018. ;;; ;;; Revision bar text
  2019. ;;; ;;;
  2020. ;;; (command "text" "18.7102,16.0825" "0.065" "0" "REVISIONS")
  2021. ;;; (command "text" "16.1087,15.8403" "0.065" "0" "ZONE")
  2022. ;;; (command "text" "16.5801,15.8403" "0.065" "0" "REV")
  2023. ;;; (command "text" "17.8820,15.8403" "0.065" "0" "DESCRIPTION")
  2024. ;;; (command "text" "19.9477,15.8403" "0.065" "0" "DATE")
  2025. ;;; (command "text" "20.7414,15.8403" "0.065" "0" "APPROVED")
  2026. ;;; ;;;
  2027. ;;; (command "text" "mc"  "0.25,2.125"  "0.25" "0" "A")
  2028. ;;; (command "text" "mc"  "0.25,6.375"  "0.25" "0" "B")
  2029. ;;; (command "text" "mc"  "0.25,10.625" "0.25" "0" "C")
  2030. ;;; (command "text" "mc"  "0.25,14.875" "0.25" "0" "D")
  2031. ;;; (command "text" "mc" "21.75,2.125"  "0.25" "0" "A")
  2032. ;;; (command "text" "mc" "21.75,6.375"  "0.25" "0" "B")
  2033. ;;; (command "text" "mc" "21.75,10.625" "0.25" "0" "C")
  2034. ;;; (command "text" "mc" "21.75,14.875" "0.25" "0" "D")
  2035. ;;; ;;;
  2036. ;;; (command "text" "mc" "19.25,0.5"    "0.25" "0" "1")
  2037. ;;; (command "text" "mc" "13.75,0.5"    "0.25" "0" "2")
  2038. ;;; (command "text" "mc"  "8.25,0.5"    "0.25" "0" "3")
  2039. ;;; (command "text" "mc"  "2.75,0.5"    "0.25" "0" "4")
  2040. ;;; ;;;
  2041. ;;; (command "text" "mc" "19.25,16.5"   "0.25" "0" "1")
  2042. ;;; (command "text" "mc" "13.75,16.5"   "0.25" "0" "2")
  2043. ;;; (command "text" "mc"  "8.25,16.5"   "0.25" "0" "3")
  2044. ;;; (command "text" "mc"  "2.75,16.5"   "0.25" "0" "4")
  2045. ;;; END_ITEM
  2046. ;;; 
  2047. ;;; An ANSI - D size sheet with Title block and revision bar.
  2048. ;;; All points are in paperspace units at a scale of 1 inch.
  2049. ;;; 
  2050. ;;; NAME - ANSI-D Size 
  2051. ;;; (command "zoom" "w" "-0.5,-0.5" "34.5,22.5")
  2052. ;;; (command "line" "0,0" "34,0" "34,22" "0,22" "C")
  2053. ;;; (command "line" "1,.5" "33,.5" "33,21.5" "1,21.5" "C")
  2054. ;;; (command "line" "4.25,.125" "4.25,.5" "")
  2055. ;;; (command "array" (entlast) "" "R" "2" "8" "21.375" "4.25")
  2056. ;;; (command "line" ".5,5.5" "1,5.5" "")
  2057. ;;; (command "array" (entlast) "" "R" "3" "2" "5.5" "32.5")
  2058. ;;; ;;;
  2059. ;;; ;;; Bottom microfilm alignment arrow
  2060. ;;; (command "pline" "17,.1" "w" "0.02" "" "17,.3" "")
  2061. ;;; (command "solid" "16.8,.3" "17.2,.3" "17,.5" "" "")
  2062. ;;; ;;; Right microfilm alignment arrow
  2063. ;;; (command "pline" "33.4,11" "w" "0.02" "" "33.4,11" "")
  2064. ;;; (command "solid" "33.2,10.8" "33.2,11.2" "33,11" "" "")
  2065. ;;; ;;; Top microfilm alignment arrow
  2066. ;;; (command "pline" "17,21.9" "w" "0.02" "" "17,21.7" "")
  2067. ;;; (command "solid" "16.8,21.7" "17.2,21.7" "17,21.5" "" "")
  2068. ;;; ;;; Left microfilm alignment arrow
  2069. ;;; (command "pline" ".6,11" "w" "0.02" "" ".8,11" "")
  2070. ;;; (command "solid" ".8,10.8" ".8,11.2" "1,11" "" "")
  2071. ;;; ;;;
  2072. ;;; ;;;
  2073. ;;; ;;; Title block
  2074. ;;; ;;;
  2075. ;;; (command "line" "25.38,.5" "25.38,3" "33,3" "")
  2076. ;;; (command "line" "27.88,.5" "27.88,3" "")
  2077. ;;; (command "line" "27.88,.75" "33,.75" "")
  2078. ;;; (command "line" "25.38,1.25" "33,1.25" "")
  2079. ;;; (command "line" "27.88,2.37" "33,2.37" "")
  2080. ;;; (command "line" "25.38,.875" "27.88,.875" "")
  2081. ;;; ;;;
  2082. ;;; (command "line" "28.87,.5" "28.87,.75" "")
  2083. ;;; (command "line" "31.25,.5" "31.25,.75" "")
  2084. ;;; (command "line" "28.26,.75" "28.26,1.25" "")
  2085. ;;; (command "line" "29.51,.75" "29.51,1.25" "")
  2086. ;;; (command "line" "32.5,.75" "32.5,1.25" "")
  2087. ;;; ;;;
  2088. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2089. ;;; (command "text" "27.9323,0.5925" "0.065" "0" "SCALE")
  2090. ;;; (command "text" "31.3028,0.5925" "0.065" "0" "SHEET")
  2091. ;;; (command "text" "27.9679,1.1359" "0.065" "0" "SIZE")
  2092. ;;; (command "text" "28.3289,1.1359" "0.065" "0" "FSCM NO.")
  2093. ;;; (command "text" "29.5810,1.1359" "0.065" "0" "DWG NO.")
  2094. ;;; (command "text" "32.6405,1.1359" "0.065" "0" "REV")
  2095. ;;; ;;;
  2096. ;;; ;;; Revision bar
  2097. ;;; ;;;
  2098. ;;; ;;; Horizontals
  2099. ;;; (command "line" "26,21.25" "33,21.25" "")
  2100. ;;; (command "line" "26,21" "33,21" "")
  2101. ;;; ;;;
  2102. ;;; ;;; Verticals
  2103. ;;; (command "line" "26,20.4527" "26,21.5" "")
  2104. ;;; (command "line" "26.5,21"  "26.5,21.25" "")
  2105. ;;; (command "line" "26.88,21" "26.88,21.25" "")
  2106. ;;; (command "line" "31.12,21" "31.12,21.25" "")
  2107. ;;; (command "line" "32,21"    "32,21.25" "")
  2108. ;;; ;;;
  2109. ;;; ;;; Revision bar text
  2110. ;;; ;;;
  2111. ;;; (command "text" "29.5746,21.3325" "0.065" "0" "REVISIONS")
  2112. ;;; (command "text" "26.1087,21.0903" "0.065" "0" "ZONE")
  2113. ;;; (command "text" "26.5801,21.0903" "0.065" "0" "REV")
  2114. ;;; (command "text" "28.7464,21.0903" "0.065" "0" "DESCRIPTION")
  2115. ;;; (command "text" "31.4477,21.0903" "0.065" "0" "DATE")
  2116. ;;; (command "text" "32.2477,21.0903" "0.065" "0" "APPROVED")
  2117. ;;; ;;;
  2118. ;;; (command "text" "mc"  "0.5,2.75" "0.25" "0" "A")
  2119. ;;; (command "text" "mc"  "0.5,8.25" "0.25" "0" "B")
  2120. ;;; (command "text" "mc"  "0.5,13.75" "0.25" "0" "C")
  2121. ;;; (command "text" "mc"  "0.5,19.25" "0.25" "0" "D")
  2122. ;;; (command "text" "mc" "33.5,2.75" "0.25" "0" "A")
  2123. ;;; (command "text" "mc" "33.5,8.25" "0.25" "0" "B")
  2124. ;;; (command "text" "mc" "33.5,13.75" "0.25" "0" "C")
  2125. ;;; (command "text" "mc" "33.5,19.25" "0.25" "0" "D")
  2126. ;;; ;;;
  2127. ;;; (command "text" "mc" "2.125,0.25"  "0.25" "0" "8")
  2128. ;;; (command "text" "mc" "6.375,0.25"  "0.25" "0" "7")
  2129. ;;; (command "text" "mc" "10.625,0.25"  "0.25" "0" "6")
  2130. ;;; (command "text" "mc" "14.875,0.25"  "0.25" "0" "5")
  2131. ;;; (command "text" "mc" "19.125,0.25"  "0.25" "0" "4")
  2132. ;;; (command "text" "mc" "23.375,0.25"  "0.25" "0" "3")
  2133. ;;; (command "text" "mc" "27.625,0.25"  "0.25" "0" "2")
  2134. ;;; (command "text" "mc" "31.875,0.25"  "0.25" "0" "1")
  2135. ;;; ;;;
  2136. ;;; (command "text" "mc" "2.125,21.75"  "0.25" "0" "8")
  2137. ;;; (command "text" "mc" "6.375,21.75"  "0.25" "0" "7")
  2138. ;;; (command "text" "mc" "10.625,21.75"  "0.25" "0" "6")
  2139. ;;; (command "text" "mc" "14.875,21.75"  "0.25" "0" "5")
  2140. ;;; (command "text" "mc" "19.125,21.75"  "0.25" "0" "4")
  2141. ;;; (command "text" "mc" "23.375,21.75"  "0.25" "0" "3")
  2142. ;;; (command "text" "mc" "27.625,21.75"  "0.25" "0" "2")
  2143. ;;; (command "text" "mc" "31.875,21.75"  "0.25" "0" "1")
  2144. ;;; END_ITEM
  2145. ;;; 
  2146. ;;; An ANSI - E size sheet with Title block and revision bar.
  2147. ;;; All points are in paperspace units at a scale of 1 inch.
  2148. ;;; 
  2149. ;;; NAME - ANSI-E Size 
  2150. ;;; (command "zoom" "w" "-0.5,-0.5" "44.5,34.5")
  2151. ;;; (command "line" "0,0" "44,0" "44,34" "0,34" "C")
  2152. ;;; (command "line" ".5,1" "43.5,1" "43.5,33" ".5,33" "C")
  2153. ;;; (command "line" "5.5,.5" "5.5,1" "")
  2154. ;;; (command "array" (entlast) "" "R" "2" "8" "32.5" "5.5")
  2155. ;;; (command "line" ".125,4.25" ".5,4.25" "")
  2156. ;;; (command "array" (entlast) "" "R" "7" "2" "4.25" "43.375")
  2157. ;;; ;;;
  2158. ;;; ;;; Bottom microfilm alignment arrow
  2159. ;;; (command "pline" "22,.6" "w" "0.02" "" "22,.8" "")
  2160. ;;; (command "solid" "21.8,.8" "22.2,.8" "22,1" "" "")
  2161. ;;; ;;; Right microfilm alignment arrow
  2162. ;;; (command "pline" "43.9,17" "w" "0.02" "" "43.7,17" "")
  2163. ;;; (command "solid" "43.7,16.8" "43.7,17.2" "43.5,17" "" "")
  2164. ;;; ;;; Top microfilm alignment arrow
  2165. ;;; (command "pline" "22,33.4" "w" "0.02" "" "22,33.2" "")
  2166. ;;; (command "solid" "21.8,33.2" "22.2,33.2" "22,33" "" "")
  2167. ;;; ;;; Left microfilm alignment arrow
  2168. ;;; (command "pline" ".1,17" "w" "0.02" "" ".3,17" "")
  2169. ;;; (command "solid" ".3,16.8" ".3,17.2" ".5,17" "" "")
  2170. ;;; ;;;
  2171. ;;; ;;;
  2172. ;;; ;;; Title block
  2173. ;;; ;;;
  2174. ;;; (command "line" "35.88,1" "35.88,3.5" "43.5,3.5" "")
  2175. ;;; (command "line" "35.88,1.375" "38.38,1.375" "")
  2176. ;;; (command "line" "35.88,1.75" "43.5,1.75" "")
  2177. ;;; (command "line" "38.38,1.25" "43.5,1.25" "")
  2178. ;;; (command "line" "38.38,2.87" "43.5,2.87" "")
  2179. ;;; ;;;
  2180. ;;; (command "line" "38.38,1" "38.38,3.5" "")
  2181. ;;; (command "line" "39.37,1" "39.37,1.25" "")
  2182. ;;; (command "line" "41.75,1" "41.75,1.25" "")
  2183. ;;; (command "line" "38.76,1.25" "38.76,1.75" "")
  2184. ;;; (command "line" "40.01,1.25" "40.01,1.75" "")
  2185. ;;; (command "line" "43,1.25" "43,1.75" "")
  2186. ;;; ;;;
  2187. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2188. ;;; (command "text" "38.4323,1.0925" "0.065" "0" "SCALE")
  2189. ;;; (command "text" "41.8028,1.0925" "0.065" "0" "SHEET")
  2190. ;;; (command "text" "38.4679,1.6359" "0.065" "0" "SIZE")
  2191. ;;; (command "text" "38.8289,1.6359" "0.065" "0" "FSCM NO.")
  2192. ;;; (command "text" "40.0810,1.6359" "0.065" "0" "DWG NO.")
  2193. ;;; (command "text" "43.1405,1.6359" "0.065" "0" "REV")
  2194. ;;; ;;;
  2195. ;;; ;;; Revision bar
  2196. ;;; ;;;
  2197. ;;; ;;; Horizontals
  2198. ;;; (command "line" "36.5,32.75" "43.5,32.75" "")
  2199. ;;; (command "line" "36.5,32.5" "43.5,32.5" "")
  2200. ;;; ;;;
  2201. ;;; ;;; Verticals
  2202. ;;; (command "line" "36.5,31.9527" "36.5,33" "")
  2203. ;;; (command "line" "37,32.5"    "37,32.75" "")
  2204. ;;; (command "line" "37.38,32.5" "37.38,32.75" "")
  2205. ;;; (command "line" "41.62,32.5" "41.62,32.75" "")
  2206. ;;; (command "line" "42.5,32.5"  "42.5,32.75" "")
  2207. ;;; ;;;
  2208. ;;; ;;; Revision bar text
  2209. ;;; ;;;
  2210. ;;; (command "text" "40.0746,32.8325" "0.065" "0" "REVISIONS")
  2211. ;;; (command "text" "36.6087,32.5903" "0.065" "0" "ZONE")
  2212. ;;; (command "text" "37.0801,32.5903" "0.065" "0" "REV")
  2213. ;;; (command "text" "39.2464,32.5903" "0.065" "0" "DESCRIPTION")
  2214. ;;; (command "text" "41.9477,32.5903" "0.065" "0" "DATE")
  2215. ;;; (command "text" "42.7477,32.5903" "0.065" "0" "APPROVED")
  2216. ;;; ;;;
  2217. ;;; (command "text" "mc" "0.25,2.125"  "0.25" "0" "A")
  2218. ;;; (command "text" "mc" "0.25,6.375"  "0.25" "0" "B")
  2219. ;;; (command "text" "mc" "0.25,10.625" "0.25" "0" "C")
  2220. ;;; (command "text" "mc" "0.25,14.875" "0.25" "0" "D")
  2221. ;;; (command "text" "mc" "0.25,19.125" "0.25" "0" "E")
  2222. ;;; (command "text" "mc" "0.25,23.375" "0.25" "0" "F")
  2223. ;;; (command "text" "mc" "0.25,27.625" "0.25" "0" "G")
  2224. ;;; (command "text" "mc" "0.25,31.875" "0.25" "0" "H")
  2225. ;;; ;;;
  2226. ;;; (command "text" "mc" "43.75,2.125"  "0.25" "0" "A")
  2227. ;;; (command "text" "mc" "43.75,6.375"  "0.25" "0" "B")
  2228. ;;; (command "text" "mc" "43.75,10.625" "0.25" "0" "C")
  2229. ;;; (command "text" "mc" "43.75,14.875" "0.25" "0" "D")
  2230. ;;; (command "text" "mc" "43.75,19.125" "0.25" "0" "E")
  2231. ;;; (command "text" "mc" "43.75,23.375" "0.25" "0" "F")
  2232. ;;; (command "text" "mc" "43.75,27.625" "0.25" "0" "G")
  2233. ;;; (command "text" "mc" "43.75,31.875" "0.25" "0" "H")
  2234. ;;; ;;;
  2235. ;;; (command "text" "mc" "2.75,0.5"  "0.25" "0" "8")
  2236. ;;; (command "text" "mc" "8.25,0.5"  "0.25" "0" "7")
  2237. ;;; (command "text" "mc" "13.75,0.5"  "0.25" "0" "6")
  2238. ;;; (command "text" "mc" "19.25,0.5"  "0.25" "0" "5")
  2239. ;;; (command "text" "mc" "24.75,0.5"  "0.25" "0" "4")
  2240. ;;; (command "text" "mc" "30.25,0.5"  "0.25" "0" "3")
  2241. ;;; (command "text" "mc" "35.75,0.5"  "0.25" "0" "2")
  2242. ;;; (command "text" "mc" "41.25,0.5"  "0.25" "0" "1")
  2243. ;;; ;;;
  2244. ;;; (command "text" "mc" "2.75,33.5"  "0.25" "0" "8")
  2245. ;;; (command "text" "mc" "8.25,33.5"  "0.25" "0" "7")
  2246. ;;; (command "text" "mc" "13.75,33.5"  "0.25" "0" "6")
  2247. ;;; (command "text" "mc" "19.25,33.5"  "0.25" "0" "5")
  2248. ;;; (command "text" "mc" "24.75,33.5"  "0.25" "0" "4")
  2249. ;;; (command "text" "mc" "30.25,33.5"  "0.25" "0" "3")
  2250. ;;; (command "text" "mc" "35.75,33.5"  "0.25" "0" "2")
  2251. ;;; (command "text" "mc" "41.25,33.5"  "0.25" "0" "1")
  2252. ;;; END_ITEM
  2253. ;;; 
  2254. ;;; A sample Architectural 24 x 36 sheet with Title block and revision bar.
  2255. ;;; All points are in paperspace units at a scale of 1 inch.
  2256. ;;; 
  2257. ;;; NAME - Arch/Engineering (24 x 36)
  2258. ;;; (command "zoom" "w" "-0.5,-0.5" "36.5,24.5")
  2259. ;;; (command "line" "0,0" "36,0" "36,24" "0,24" "C")
  2260. ;;; ;;; Outer border line
  2261. ;;; (command "pline" ".5,.5" "w" "0.1" "" "35.5,.5" "35.5,23.5" ".5,23.5" "C")
  2262. ;;; (command "fillet" "r" "1")
  2263. ;;; (command "fillet" "p" "l")
  2264. ;;; ;;;
  2265. ;;; ;;; Title block
  2266. ;;; ;;;
  2267. ;;; ;;; Outer border line
  2268. ;;; (command "pline" "31,1" "w" "0.05" "" "35,1" "35,23" "31,23" "C")
  2269. ;;; (command "fillet" "r" ".5")
  2270. ;;; (command "fillet" "p" "l")
  2271. ;;; ;;;
  2272. ;;; ;;; Sheet No. border line
  2273. ;;; (command "pline" "31.25,1.25" "34.75,1.25" "34.75,2.75" "31.25,2.75" "C")
  2274. ;;; (command "fillet" "r" ".25")
  2275. ;;; (command "fillet" "p" "l")
  2276. ;;; ;;;
  2277. ;;; ;;; Project border line
  2278. ;;; (command "pline" "31.25,3" "34.75,3" "34.75,5" "31.25,5" "C")
  2279. ;;; (command "fillet" "p" "l")
  2280. ;;; ;;;
  2281. ;;; ;;; Firm border line
  2282. ;;; (command "pline" "31.25,5.25" "34.75,5.25" "34.75,7.25" "31.25,7.25" "C")
  2283. ;;; (command "fillet" "p" "l")
  2284. ;;; ;;;
  2285. ;;; ;;; Notes/Revisions border line
  2286. ;;; (command "pline" "31.25,7.5" "34.75,7.5" "34.75,22.75" "31.25,22.75" "C")
  2287. ;;; (command "fillet" "p" "l")
  2288. ;;; ;;;
  2289. ;;; ;;; Sheet No. lines
  2290. ;;; (command "pline" "33.25,1.25" "w" "0.025" "" "33.25,2.75" "")
  2291. ;;; (command "pline" "31.25,2.25" "33.25,2.25" "")
  2292. ;;; (command "pline" "31.25,1.75" "33.25,1.75" "")
  2293. ;;; ;;;
  2294. ;;; ;;; Notes/Revisions lines
  2295. ;;; (command "pline" "31.75,7.5"   "31.75,8.625" "")
  2296. ;;; (command "pline" "34.125,7.5"  "34.125,8.625" "")
  2297. ;;; (command "pline" "31.25,7.875" "34.75,7.875" "")
  2298. ;;; (command "pline" "31.25,8.25"  "34.75,8.25" "")
  2299. ;;; (command "pline" "31.25,8.625" "34.75,8.625" "")
  2300. ;;; ;;;
  2301. ;;; (command "pline" "31.25,22.375" "34.75,22.375" "")
  2302. ;;; ;;;
  2303. ;;; ;;; Sheet text
  2304. ;;; (command "style" "adesk1" "romans" "0" "1.0" "0" "" "" "")
  2305. ;;; (command "text" "31.4054,7.0711" "0.065" "0" "Firm Name and Address")
  2306. ;;; (command "text" "31.4054,4.8211" "0.065" "0" "Project Name and Address")
  2307. ;;; (command "text" "31.4054,2.5846" "0.065" "0" "Project")
  2308. ;;; (command "text" "33.3899,2.5846" "0.065" "0" "Sheet")
  2309. ;;; (command "text" "31.4054,2.0989" "0.065" "0" "Date")
  2310. ;;; (command "text" "31.4054,1.6132" "0.065" "0" "Scale")
  2311. ;;; ;;;
  2312. ;;; ;;; Revision bar text
  2313. ;;; ;;;
  2314. ;;; (command "text" "mc" "32.9983,22.5578" "0.1" "0" "General Notes")
  2315. ;;; (command "text" "mc" "31.5136,7.7034" "0.1" "0" "No.")
  2316. ;;; (command "text" "mc" "32.9983,7.7034" "0.1" "0" "Revision/Issue")
  2317. ;;; (command "text" "mc" "34.4338,7.7034" "0.1" "0" "Date")
  2318. ;;; ;;;
  2319. ;;; END_ITEM
  2320. ;;; END_DATA
  2321. ;;; 
  2322. ;;; MVIEWS
  2323. ;;; None, 0, 0
  2324. ;;; Single, 1, 1, PLAN
  2325. ;;; Std. Engineering, 2, 2, FRONT, PLAN, RIGHT, ISO
  2326. ;;; Array of Viewports
  2327. ;;; END_MVIEWS
  2328. ;;; 
  2329. ;;; VPSETNAME  - Single
  2330. ;;; (command "mview" ll_crn ur_crn)
  2331. ;;; END_ITEM
  2332. ;;; VPSETNAME  - Std. Engineering
  2333. ;;; END_ITEM
  2334. ;;; VPSETNAME  - Array of Viewports
  2335. ;;; END_ITEM
  2336. ;;; 
  2337. ;;; END_DATA
  2338. ;;; 
  2339.