这是什么东西
;;;
;;; mvsetup.lsp
;;;
;;; Copyright 1990-2003 by Autodesk, Inc.
;;;
;;; Permission to use, copy, modify, and distribute this software
;;; for any purpose and without fee is hereby granted, provided
;;; that the above copyright notice appears in all copies and
;;; that both that copyright notice and the limited warranty and
;;; restricted rights notice below appear in all supporting
;;; documentation.
;;;
;;; AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
;;; DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;; UNINTERRUPTED OR ERROR FREE.
;;;
;;; Use, duplication, or disclosure by the U.S. Government is subject to
;;; restrictions set forth in FAR 52.227-19 (Commercial Computer
;;; Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;; (Rights in Technical Data and Computer Software), as applicable.
;;;
;;;
;;; DESCRIPTION
;;;
;;; This is a setup routine for Mview.
;;;
;;; It is based around a set of functionality that was determined to be a
;;; necessary part of preparing a drawing for plotting. This routine allows
;;; the user to insert several pre-defined title blocks (ANSI A - E) and in
;;; addition it allows the user to create a set of viewports within the
;;; title block just inserted. A global scale may be specified as a ratio
;;; between the scale of the title block in paperspace and the model geometry
;;; in modelspace. For example, if you were doing an engineering drawing at
;;; a scale of 1:4 or quarter scale, then you would specify that you wanted
;;; a ratio of 1 paperspace unit to 4 modelspace units. The routine will
;;; convert this to 0.25xp for the Zoom command. You may also elect to
;;; align the viewports.
;;;
;;; (The first time you invoke MVSETUP, you may notice a slight delay.
;;; This occurs because the routine is creating a default file of various
;;; title blocks and viewport layouts. If you should accidentally erase
;;; your default file, another will be created the next time you invoke
;;; MVSETUP. The file will be created in the directory specified by the
;;; AutoCAD system variable "ACADPREFIX". If you run AutoCAD from a
;;; directory other than that one, and the system variables ACAD or ACADCFG
;;; do not point to that directory, then MVSETUP will not be able to find
;;; it, and will create a new one in the directory pointed to by the first
;;; path found in the current setting of the AutoCAD system variable
;;; "ACADPREFIX".)
;;;
;;; When you invoke MVSETUP from the command line or one of the menus, you
;;; are given four options; three dealing with the creation and manipulation
;;; of viewports, and one which allows you to insert various "title blocks".
;;; The initial prompt is shown below.
;;;
;;; Align/Create/Scale viewports/Options/Title block/Undo:
;;;
;;; The Align viewports option presents you with several more options; you
;;; are asked to determine the type of alignment you wish to perform.
;;;
;;; Angled/Horizontal/Vertical alignment/Rotate view/Undo?
;;;
;;; The Horizontal and Vertical options ask you to pick a basepoint in one
;;; viewport, and the point to move in another viewport. The view in the
;;; second viewport is panned by the offset distance in X or Y between
;;; the two points relative to the zoom scale factor of the second viewport.
;;;
;;; The Angled option asks you for these two points and for a distance and
;;; angle from the basepoint. The point in the first viewport at the
;;; specified distance and angle from the basepoint is where the "other"
;;; point will be panned.
;;;
;;; The Rotate view option asks you for a basepoint and a rotation angle
;;; and uses the DVIEW command to change the view twist. This generally
;;; will be useful only when the UCS of the view you are rotating is
;;; parallel to the screen and would be used to align a view with an
;;; angled edge with the Align Angled option.
;;;
;;; Selecting Create viewports prompts you with the following:
;;;
;;; Delete objects/<Create viewports>:
;;;
;;; Selecting Delete objects provides you with a general selection prompt
;;; at which time you may delete any paperspace objects that you wish.
;;; This is intended to allow you to clear an area for your new viewports.
;;; Modelspace entities will NOT be removed.
;;;
;;;
;;; Selecting Create viewports prompts you to select one of the viewport
;;; options listed.
;;;
;;; Available Mview viewport layout options:
;;;
;;; 0: None
;;; 1: Single
;;; 2: Std. Engineering
;;; 3: Array of Viewports
;;;
;;; Redisplay/<Number of entry to load>:
;;;
;;; Pressing RETURN or selecting "None" returns you to the main prompt
;;; without creating any viewports.
;;;
;;; "Single" is a single viewport which can fill the default area open in
;;; the sheet or it can be located by picking two points on the screen.
;;;
;;; Std. Engineering is a set of four viewports with the upper left viewport
;;; in plan view, the lower left in a front view, the lower right in a right
;;; side view, and the upper right in an oblique view at -45 degrees from 0
;;; and up 30 degrees.
;;;
;;; The "Array of Viewports" allows you to specify any array of viewports
;;; that you want to place on your sheet, from a 1 by 2 or 2 by 1 to any
;;; level allowed by AutoCAD.
;;;
;;;
;;; After selecting option 1, 2 or 3, you are prompted to specify the bounding
;;; area for the viewports that are to be created. Each of the title blocks
;;; provided has a bounding region defined for it in the default file. You
;;; can elect to create all of the viewports within this region by selecting
;;; "Default" at the following prompt:
;;;
;;; Bounding area for viewports. Default/<First point >:
;;;
;;; You can also select two points on the screen and the number of viewports
;;; you subsequently define will be mapped into this area.
;;;
;;; Picking options 2 or 3 prompts you to specify the distance between the
;;; viewports; the interstitial distance. This value must be a positive
;;; number but may be zero. The value you enter for X is automatically
;;; assigned to Y, though you may specify Y to have a different value.
;;; If you selected option 2 above, then the four viewports are created and
;;; the four views are mapped into them as defined in the default file.
;;; The other options create the viewports but do not change the views in
;;; any of them; the view will be a plan view in the current UCS.
;;;
;;;
;;; Selecting Scale viewports at the main menu prompts you to select the
;;; viewports you wish to scale. If you select one or more viewports
;;; you asked whether you wnat to set the zoom scales all at once or for
;;; each viewport separately:
;;;
;;; Set zoom scale factors for viewports. Interactively/<Uniform>:
;;;
;;; After selecting one of these you are asked the following;
;;;
;;; Enter the ratio of paper space units to model space units...
;;; Number of paper space units. <1.0>:
;;; Number of model space units. <1.0>:
;;;
;;; The number of viewports specified will have their zoom scales changed
;;; by the ratio of the paper space units divided by the model space units.
;;; This is cumulative over time, so performing this operation twice with
;;; paper space units set to 1.0 and model space units set to 2.0 will give
;;; the same results as doing it once with 1.0 an 4.0 as the values.
;;;
;;;
;;; Selecting Options at the main menu allows you to specify several
;;; preferences for operation of Mvsetup. They are:
;;;
;;; Set Layer/LImits/Units/Xref:
;;;
;;; The Layer option allows you to specify a layer, existing or new, on
;;; which to insert the title block, the LImits option allows you to
;;; specify whether or not to reset the limits to the drawing extents after
;;; a title block has been inserted, Units specifies whether the sizes and
;;; point locations are to be translated to inch or millimeter paper units,
;;; and the Xref option let's you determine whether the title block is to
;;; be inserted or Xref'ed.
;;;
;;;
;;; Selecting Title block from the main menu gives you another sub-menu.
;;;
;;; Delete objects/Origin/<Insert title block>:
;;;
;;; Delete objects works as described above under Create viewports.
;;; Origin allows you to specify a new UCS origin for the subsequent
;;; insertion of a title block. Pressing RETURN will cause you to be
;;; presented with a list of available title blocks or sheets.
;;;
;;; Available title block options:
;;;
;;; 0: NONE
;;; 1: ISO A4 Size(mm)
;;; 2: ISO A3 Size(mm)
;;; 3: ISO A2 Size(mm)
;;; 4: ISO A1 Size(mm)
;;; 5: ISO A0 Size(mm)
;;; 6: ANSI-V Size(in)
;;; 7: ANSI-A Size(in)
;;; 8: ANSI-B Size(in)
;;; 9: ANSI-C Size(in)
;;; 10: ANSI-D Size(in)
;;;
;;; 11: ANSI-E Size(in)
;;; 12: Arch/Engineering (24 x 36 in)
;;;
;;; Add/Redisplay/<Number of entry to load>:
;;;
;;; This list includes ISO standard sheets used outside the US, specified
;;; in millimeters, the ANSI standard sheet layouts from A to E and size
;;; A Vertical specified in inches. Selecting the number preceding one of the
;;; selections causes one of two things to occur. One, if the AutoCAD
;;; drawing associated with the selections cannot be found, then the
;;; default file is read, a definition is extracted, and the drawing is
省略... |