home *** CD-ROM | disk | FTP | other *** search
- ;;;----------------------------------------------------------------------------
- ;;;
- ;;; DDVIEW.LSP ¬⌐Ñ╗ 0.6
- ;;;
- ;;; ¬⌐┼v (C) 1991-1992 Autodesk ñ╜Ñq
- ;;;
- ;;; Ñ╗│n┼ΘºK╢O¿╤▒z╢iªµÑ⌠ª≤Ñ╬│~╗▌¿D¬║½■¿⌐íB¡╫º∩ñ╬╡oªµ, ª²¼O░╚╜╨┐φ┤`ñU¡z
- ;;; ¡∞½h :
- ;;;
- ;;; 1) ñWªC¬║¬⌐┼v│qºi░╚╗▌ÑX▓{ªb¿Cñ@Ñ≈½■¿⌐∙╪íC
- ;;; 2) ¼█├÷¬║╗í⌐·ñσÑ≤ñ]Ñ▓╢╖⌐·╕ⁿ¬⌐┼v│qºiñ╬Ñ╗╢╡│\Ñi│qºiíC
- ;;;
- ;;; Ñ╗│n┼Θ╢╚┤ú¿╤º@¼░└│Ñ╬ñW¬║░╤ª╥, ª╙Ñ╝┴n⌐·⌐╬┴⌠ºtÑ⌠ª≤½O├╥; ╣∩⌐≤Ñ⌠ª≤»S«φ
- ;;; Ñ╬│~ñº╛A║┘⌐╩, ÑHñ╬░╙╖~╛P░Γ⌐╥┴⌠ºtÑX¿π¬║½O├╥, ªbª╣ñ@╖ºñ⌐ÑHº_╗{íC
- ;;;
- ;;;
- ;;;----------------------------------------------------------------------------
- ;;; DESCRIPTION
- ;;;
- ;;; Dialogue interface to VIEW command. Uses DDVIEW.DCL
- ;;;
- ;;;----------------------------------------------------------------------------
- ;;;----------------------------------------------------------------------------
- ;;; Prefixes in command and keyword strings:
- ;;; "." specifies the built-in AutoCAD command in case it has been
- ;;; redefined.
- ;;; "_" denotes an AutoCAD command or keyword in the native language
- ;;; version, English.
- ;;;----------------------------------------------------------------------------
- ;;;
- ;;; ===========================================================================
- ;;; ===================== load-time error checking ============================
- ;;;
-
- (defun ai_abort (app msg)
- (defun *error* (s)
- (if old_error (setq *error* old_error))
- (princ)
- )
- (if msg
- (alert (strcat " └│Ñ╬╡{ªí┐∙╗~: "
- app
- " \n\n "
- msg
- " \n"
- )
- )
- )
- (exit)
- )
-
- ;;; Check to see if AI_UTILS is loaded, If not, try to find it,
- ;;; and then try to load it.
- ;;;
- ;;; If it can't be found or it can't be loaded, then abort the
- ;;; loading of this file immediately, preserving the (autoload)
- ;;; stub function.
-
- (cond
- ( (and ai_dcl (listp ai_dcl))) ; it's already loaded.
-
- ( (not (findfile "ai_utils.lsp")) ; find it
- (ai_abort "DDVIEW"
- (strcat "ºΣñú¿∞íuAI_UTILS.LSPív└╔«╫;"
- "\n ╜╨└╦¼díusupportívÑ╪┐²íC")))
-
- ( (eq "failed" (load "ai_utils" "failed")) ; load it
- (ai_abort "DDVIEW" "╡L¬k╕ⁿñJíuAI_UTILS.LSPív└╔«╫"))
- )
-
- (if (not (ai_acadapp)) ; defined in AI_UTILS.LSP
- (ai_abort "DDVIEW" nil) ; a Nil <msg> supresses
- ) ; ai_abort's alert box dialog.
-
- ;;; ==================== end load-time operations ===========================
-
- ;;;
- ;;; DDVIEW code.
- ;;;
- (defun c:ddview ( /
- ai_abort lboxlist restore_view vt
- appname lboxname rm_item vtar
- check_name list_no s what_next
- dcl_id make-lists save_view what_next1
- delete name temp_lisp_list what_space
- delete_list named_others the_list which_save
- describe new_names update_list wid
- enable_rad new_others value wview
- errmsg new_view vcen x1y1
- new_view_name vdir x2
- grey_des no_redefine viewname x2y2
- hi old_cmd viewtype y1
- init_list old_error y2
- j picked_no vmode undo_init
- lab restorable
- restore vnlist
- )
- ;;
- ;; Pass an item and a list and recieve a number showing it's position in
- ;; the list, nil otherwise. Item must be in the list, and the list must
- ;; contain unique names. 0 if first item.
- ;;
- (defun what_pos (item the_list / pos)
- (setq pos (- (length the_list)
- (length (member item the_list)))
- )
- )
- ;;
- ;; Get information for description of new (not existing yet) views.
- ;;
- (defun new_others()
- (if (cdr (assoc viewname new_names))
- (progn
- (setq wid (abs (- x2 x1)))
- (setq hi (abs (- y2 y1)))
- )
- (progn
- (setq wid (/ (* (getvar "viewsize") (abs (- x2 x1)))
- (abs (- y2 y1))
- )
- )
- (setq hi (getvar "viewsize"))
- )
- )
- (set_tile "v_height" (rtos hi))
- (set_tile "v_width" (rtos wid))
- (set_tile "v_twist" (angtos (getvar "viewtwist")))
- (set_tile "lens" (rtos (getvar "lenslength")))
- (set_tile "fclip" (rtos (getvar "frontz")))
- (set_tile "bclip" (rtos (getvar "backz")))
-
- ;; Viewdir is stored in UCS (yeah UCS)
- (setq vdir (getvar "viewdir"))
- (if (= 1 wview)
- (setq vdir (trans vdir 1 0 T))
- )
- (set_tile "vdir_x" (rtos (car vdir)))
- (set_tile "vdir_y" (rtos (cadr vdir)))
- (set_tile "vdir_z" (rtos (caddr vdir)))
-
- (setq vmode (getvar "viewmode"))
- (if (= (logand 2 vmode) 2)
- (set_tile "fclipon" "ON")
- (set_tile "fclipon" "OFF")
- )
- (if (= (logand 4 vmode) 4)
- (set_tile "bclipon" "ON")
- (set_tile "bclipon" "OFF")
- )
- (if (= (logand 1 vmode) 1)
- (progn
- (set_tile "persp" "ON")
- (if (= 1 wview)
- (setq lab "Target (WCS)")
- (setq lab "Target (UCS)")
- )
- (set_tile "cen_tar" lab)
- (setq vtar (getvar "target"))
- ;; Target is stored in UCS
- (if (= 1 wview)
- (setq vtar (trans vtar 1 0))
- )
- (set_tile "vtar_x" (rtos (car vtar)))
- (set_tile "vtar_y" (rtos (cadr vtar)))
- (set_tile "vtar_z" (rtos (caddr vtar)))
- )
- (progn
- (set_tile "persp" "OFF")
- (if (= 1 wview)
- (setq lab "Center (WCS)")
- (setq lab "Center (UCS)")
- )
- (set_tile "cen_tar" lab)
- ;; Viewctr is stored UCS
- (setq vtar (getvar "viewctr"))
- (if (= 1 wview)
- (setq vtar (trans vtar 1 0))
- )
- (set_tile "vtar_x" (rtos (car vtar)))
- (set_tile "vtar_y" (rtos (cadr vtar)))
- (set_tile "vtar_z" (rtos (caddr vtar)))
- )
- )
- )
-
- ;;
- ;; Description of view.
- ;;
- (defun describe ()
- ;;
- ;; Views can either be new or existing. New views that are created
- ;; are based on the current display and current settings of a bunch
- ;; of system variables. Existing views have their description stored
- ;; in the View symbol table referenced by a number of group codes.
- ;; If perspective is on, a Target point is described and if perspective
- ;; is off a Center point is described. If Worldview is on (1), the
- ;; direction and Center/Target points are described in WCS rather than
- ;; UCS.
- ;;
- ;; Center Target Direction
- ;; New Views
- ;; Perspective ON - target (UCS) viewdir (UCS)
- ;; Perspective OFF viewctr (UCS) - viewdir (UCS)
- ;;
- ;; Named Views
- ;; Perspective ON - 12 Group (WCS) 11 Group (UCS)
- ;; Perspective OFF 10 group (DCS) - 11 Group (UCS)
- ;;
- ;;
-
- (setq wview (getvar "worldview"))
- (setq viewname (nth (atoi picked_no) vnlist))
- (if (not (new_dialog "vinquiry" dcl_id)) (exit))
-
- (set_tile "v_name" viewname)
-
- (if (= 1 wview)
- (setq lab "Direction (WCS)")
- (setq lab "Direction (UCS)")
- )
- (set_tile "direction" lab)
-
- (if (or (assoc viewname new_names)
- (= "* Ñ╪½e *" viewname)
- )
- (new_others)
- (named_others)
- )
-
- (action_tile "accept" "(done_dialog 1)")
- (start_dialog)
- )
- ;;
- ;; Get information for description of existing views.
- ;;
- (defun named_others()
- (setq vt (tblsearch "view" viewname))
- (set_tile "v_height" (rtos (cdr (assoc 40 vt))))
- (set_tile "v_width" (rtos (cdr (assoc 41 vt))))
- (set_tile "v_twist" (angtos (cdr (assoc 50 vt))))
- (set_tile "lens" (rtos (cdr (assoc 42 vt))))
- (set_tile "fclip" (rtos (cdr (assoc 43 vt))))
- (set_tile "bclip" (rtos (cdr (assoc 44 vt))))
- (setq vdir (cdr (assoc 11 vt)))
- ;; Stored in UCS
- (if (= 1 wview)
- (setq vdir (trans vdir 1 0 T))
- )
- (set_tile "vdir_x" (rtos (car vdir)))
- (set_tile "vdir_y" (rtos (cadr vdir)))
- (set_tile "vdir_z" (rtos (caddr vdir)))
-
- (setq vmode (cdr (assoc 71 vt)))
- (if (= (logand 1 vmode) 2)
- (set_tile "fclipon" "ON")
- (set_tile "fclipon" "OFF")
- )
- (if (= (logand 1 vmode) 4)
- (set_tile "bclipon" "ON")
- (set_tile "bclipon" "OFF")
- )
- (if (= (logand 1 vmode) 1)
- (progn
- (set_tile "persp" "ON")
- (if (= 1 wview)
- (setq lab "Target (WCS)")
- (setq lab "Target (UCS)")
- )
- (set_tile "cen_tar" lab)
- (setq vtar (cdr (assoc 12 vt)))
- ;; Stored in WCS
- (if (= 0 wview)
- (setq vtar (trans vtar 0 1))
- )
- (set_tile "vtar_x" (rtos (car vtar)))
- (set_tile "vtar_y" (rtos (cadr vtar)))
- (set_tile "vtar_z" (rtos (caddr vtar)))
- )
- (progn
- (set_tile "persp" "OFF")
- (if (= 1 wview)
- (setq lab "Center (WCS)")
- (setq lab "Center (UCS)")
- )
- (set_tile "cen_tar" lab)
- (setq vtar (cdr (assoc 10 vt)))
- ;; Stored in DCS
- (if (= 1 wview)
- (setq vtar (trans vtar 2 0))
- (setq vtar (trans vtar 2 1))
- )
- (set_tile "vtar_x" (rtos (car vtar)))
- (set_tile "vtar_y" (rtos (cadr vtar)))
- (set_tile "vtar_z" (rtos (caddr vtar)))
- )
- )
- )
- ;;
- ;; Set up a variable that will be used when checking to see if a
- ;; selected view can be restored or not. This variable is set
- ;; once when the dialogue is called to minimise time wasted.
- ;;
- (defun what_space()
- (cond
- ;; If in pspace and there are no mspace viewports do not allow
- ;; a mspace viewport to be resored.
- ((and (= 0 (getvar "tilemode"))
- (= 1 (getvar "cvport"))
- (not (cdr (vports)))
- )
- (setq restorable "no_mspace")
- )
- ;; If in mspace (either one), do not allow a pspace viewport to
- ;; be restored.
- ((or (= 1 (getvar "tilemode"))
- (and (= 0 (getvar "tilemode"))
- (/= 1 (getvar "cvport"))
- )
- )
- (setq restorable "no_pspace")
- )
- (t (setq restorable nil))
- )
- )
- ;;
- ;; This function checks the validity of a table item name. If legitimate,
- ;; the table item name is returned, nil otherwise.
- ;;
- (defun check_name (name)
- (cond
- ((not name)
- (set_tile "error" "╡L«─ í╨ ñú▒╡¿ⁿíuNull ╡°┤║ªW║┘ívíC")
- nil
- )
- ((= "" new_view_name)
- (set_tile "error" "╡L«─ í╨ ñú▒╡¿ⁿíuNull ╡°┤║ªW║┘ívíC")
- nil
- )
- ((wcmatch name "*[] `#`@`.`?`*`~`[`,`'!%^&()+={}|`\\:;\"<>/]*")
- (set_tile "error" "íu╡°┤║ªW║┘ívññºtª│íu╡L«─ªrñ╕ívíC")
- nil
- )
- ((< 31 (strlen new_view_name))
- (set_tile "error" "íu╡°┤║ªW║┘ív╢WÑX 31 ¡╙ªrñ╕ñW¡¡íC")
- nil
- )
- (t (set_tile "error" "") name)
- )
- )
- ;;
- ;; This function checks the validity of a table item name. If legitimate,
- ;; the table item name is returned, nil otherwise.
- ;;
- (defun check_name1 (name)
- (cond
- ((wcmatch name "*[] `#`@`.`?`*`~`[`,`'!%^&()+={}|`\\:;\"<>/]*")
- (set_tile "error" "íu╡°┤║ªW║┘ívññºtª│íu╡L«─ªrñ╕ívíC")
- nil
- )
- ((< 31 (strlen new_view_name))
- (set_tile "error" "íu╡°┤║ªW║┘ív╢WÑX 31 ¡╙ªrñ╕ñW¡¡íC")
- nil
- )
- (t (set_tile "error" "") name)
- )
- )
- ;;
- ;; Adding a new view name.
- ;;
- (defun save_view()
- (setq new_view_name (strcase (ai_strtrim (get_tile "new_view_name"))))
- (cond
- ((not (check_name new_view_name)) (mode_tile "new_view_name" 2))
- ((and (= x1 x2)
- (= y1 y2)
- )
- (set_tile "error" "╡L«─ í╨ ╡°╡ííu¿ñ┬IívñúÑiª@┬IíC")
- )
- ((and (or (member new_view_name init_list)
- (assoc new_view_name new_names)
- )
- (not (member new_view_name delete_list))
- (no_redefine) ; if T, the redefinition was cancelled.
- ))
- (t
- ;; If the new view to be defined already exists in the drawing
- ;; then the name must be added to the delete list, in case the
- ;; newly defined view is later deleted.
- (if (member new_view_name init_list)
- (progn
- (setq delete_list (cons new_view_name delete_list))
- (setq vnlist (append
- (reverse (cdr (member
- new_view_name (reverse vnlist))))
- (cdr (member new_view_name vnlist))
- )
- )
- (setq lboxlist
- (rm_item (what_pos new_view_name vnlist) lboxlist)
- )
- )
- )
- (if (assoc new_view_name new_names)
- ;; remove new view name from new name list.
- (progn
- (setq new_names
- (append
- (reverse (cdr (member
- (assoc new_view_name new_names)
- (reverse new_names)
- )))
- (cdr (member (assoc new_view_name new_names) new_names))
- )
- )
- (setq list_no (- (length vnlist)
- (length (member new_view_name vnlist))
- ))
- (setq vnlist (rm_item list_no vnlist))
- (setq lboxlist (rm_item list_no lboxlist))
- )
- )
- (if (= 1 which_save)
- (setq new_names (append (list (list new_view_name)) new_names))
- (setq new_names (append
- (list (list new_view_name x1 y1 x2 y2))
- new_names
- )
- )
-
- )
- ;; Add *current* to the lists.
- (if (= 1 (getvar "cvport"))
- (setq viewtype "PSPACE")
- (setq viewtype "MSPACE")
- )
- (setq vnlist (append vnlist (list new_view_name)))
- (setq lboxlist
- (append lboxlist (list (strcat new_view_name "\t" viewtype)))
- )
- (if (>= (getvar "maxsort") (length vnlist))
- (progn
- (if vnlist (setq vnlist (acad_strlsort vnlist)))
- (if lboxlist (setq lboxlist (acad_strlsort lboxlist)))
- )
- )
- (done_dialog 1)
- (setq new_view_name nil) ; set the name to nil for the next time.
- )
- )
- )
- ;;
- ;; Update View list.
- ;;
- (defun update_list()
- (start_list "list_view")
- (mapcar 'add_list lboxlist)
- (end_list)
- (set_tile "list_view" "0")
- (setq picked_no "0")
- (grey_des)
- )
- ;;
- ;; If the new name already exists, inquire to overwrite it.
- ;;
- (defun no_redefine()
- (if (not (new_dialog "valert" dcl_id)) (exit))
- (action_tile "accept" "(done_dialog 1)")
- (action_tile "cancel" "(done_dialog 0)")
- (if (= 0 (start_dialog)) t) ; return T on Cancel
- )
- ;;
- ;; Pass a number and a list and recieve the list back with that item missing.
- ;;
- (defun rm_item (value the_list)
- (setq temp_lisp_list '())
- (setq j 0)
- (foreach n the_list
- (if (/= value j)
- (setq temp_lisp_list (cons n temp_lisp_list))
- )
- (setq j (1+ j))
- )
- (setq temp_lisp_list (reverse temp_lisp_list))
- )
- ;;
- ;; Delete view from list.
- ;;
- (defun delete()
- (setq viewname (nth (atoi picked_no) vnlist))
- (if (= viewname restore_view)
- (progn
- (setq restore_view "* Ñ╪½e *")
- (set_tile "res_text" restore_view)
- )
- )
- ;; When deleting an item that only exists on the new list then
- ;; don't add it to the delete list. Only add items to the
- ;; delete list when they are not members of the new list and
- ;; they are not members of the delete list already.
- (if (assoc viewname new_names)
- ;; remove new view name for new name list.
- (setq new_names
- (append
- (reverse (cdr (member
- (assoc viewname new_names)
- (reverse new_names)
- )))
- (cdr (member (assoc viewname new_names) new_names))
- )
- )
- ;; only add it if it is not a member already and it is not
- ;; a member of the new name list.
- (if (not (member viewname delete_list))
- (setq delete_list (cons viewname delete_list))
- )
- )
- (setq vnlist (rm_item (atoi picked_no) vnlist))
- (setq lboxlist (rm_item (atoi picked_no) lboxlist))
- (update_list)
- )
- ;;
- ;; Disable the Describe button for *CURRENT* and new views.
- ;;
- (defun grey_des()
- (setq viewname (nth (atoi picked_no) vnlist))
- (setq lboxname (nth (atoi picked_no) lboxlist))
- (if (= "* Ñ╪½e *" viewname)
- (mode_tile "delete" 1)
- (mode_tile "delete" 0)
- )
- (cond
- ((and (= "no_mspace" restorable)
- (= "\tMSPACE" (substr lboxname (- (strlen lboxname) 6)))
- )
- (mode_tile "restore" 1)
- )
- ((and (= "no_pspace" restorable)
- (= "\tPSPACE" (substr lboxname (- (strlen lboxname) 6)))
- )
- (mode_tile "restore" 1)
- )
- (t
- (mode_tile "restore" 0)
- )
- )
- )
- ;;
- ;; Update text string to reflect current view to restore.
- ;;
- (defun restore ()
- (setq restore_view (nth (atoi picked_no) vnlist))
- (set_tile "res_text" restore_view)
- )
- ;;
- ;; Creates a list of views in the drawing.
- ;;
- (defun make-lists(/ vname vlist flag lbname)
- (setq vnlist nil lboxlist nil)
- (setq vlist (tblnext "view" T))
- (while vlist
- (setq vname (cdr (assoc 2 vlist)))
- (setq flag (cdr (assoc 70 vlist)))
- (if (= 1 (logand flag 1))
- (setq viewtype "PSPACE")
- (setq viewtype "MSPACE")
- )
- (setq lbname (strcat vname "\t" viewtype))
- (setq vnlist (append vnlist (list vname)))
- (setq lboxlist (append lboxlist (list lbname)))
- (setq vlist (tblnext "view"))
- )
-
- ;; Add *CURRENT* to the lists.
- (setq vnlist (append (list "* Ñ╪½e *") vnlist))
- (setq lboxlist (append (list "* Ñ╪½e *") lboxlist))
-
- (setq init_list vnlist) ; needed for checking purposes.
-
- (if (>= (getvar "maxsort") (length vnlist))
- (progn
- (if vnlist (setq vnlist (acad_strlsort vnlist)))
- (if lboxlist (setq lboxlist (acad_strlsort lboxlist)))
- )
- )
- )
- ;;
- ;; Brings up the nested dialogue for creating new views.
- ;;
- (defun new_view()
- (if (not (new_dialog "new_view" dcl_id)) (exit))
-
- ;; Set up initial values.
- (if (not which_save)
- (progn
- (setq which_save 1)
- )
- )
-
- (mode_tile "new_view_name" 2) ; set focus to the edit box.
-
- (if (= 1 which_save)
- (set_tile "r_current" "1")
- (set_tile "r_window" "1")
- )
-
- (setq x1 (car x1y1))
- (setq y1 (cadr x1y1))
- (setq x2 (car x2y2))
- (setq y2 (cadr x2y2))
-
- (set_tile "x1_text" (rtos x1))
- (set_tile "y1_text" (rtos y1))
- (set_tile "x2_text" (rtos x2))
- (set_tile "y2_text" (rtos y2))
-
- (enable_rad which_save)
-
- (if new_view_name (set_tile "new_view_name" new_view_name))
-
- ;; Set up actions.
- (action_tile "r_current" "(enable_rad 1)(setq which_save 1)")
- (action_tile "r_window" "(enable_rad 0)(setq which_save 0)")
- (action_tile "window" "(done_dialog 3)")
- (action_tile "save_view" "(save_view)")
- (action_tile "new_view_name" "(check_name1 (setq new_view_name $value))")
-
- (setq what_next1 (start_dialog))
- (cond
- ((= 3 what_next1)
- (done_dialog 2)
- )
- ((= 1 what_next1)
- (update_list)
- )
- )
- )
- ;;
- ;; Disable/Enable the controls when picking in the New View dialogue.
- ;;
- (defun enable_rad (value)
- (mode_tile "window" value)
- (mode_tile "fc" value)
- (mode_tile "oc" value)
- )
- ;;
- ;; Put up the dialogue.
- ;;
- (defun ddview_main()
-
- (make-lists) ; Create the view lists.
-
- (what_space)
-
- (setq x1y1 (getvar "vsmin"))
- (setq x2y2 (getvar "vsmax"))
-
- (setq x1 (car x1y1))
- (setq y1 (cadr x1y1))
- (setq x2 (car x2y2))
- (setq y2 (cadr x2y2))
-
-
- (setq what_next 5)
- (setq what_next1 nil)
- (while (< 1 what_next) ; Loop necessary for hiding
- (if (not (new_dialog "view" dcl_id)) (exit))
- ;; Put them in the list box.
- (start_list "list_view")
- (mapcar 'add_list lboxlist)
- (end_list)
-
- ;; Set up initial defaults.
- (setq picked_no "0")
- (set_tile "list_view" "0")
- (set_tile "res_text" (nth (atoi picked_no) vnlist)) ; *current*
- (mode_tile "delete" 1)
-
- ;; Define action of widgets
- (action_tile "restore" "(restore)")
- (action_tile "save" "(st_save)")
- (action_tile "window" "(st_window)")
- (action_tile "delete" "(delete)")
- (action_tile "list_view" "(setq picked_no $value)(grey_des)")
- (action_tile "edit_view" "(vedit_act $value)")
- (action_tile "help" "(acad_helpdlg \"acad.hlp\" \"ddview\")")
- (action_tile "describe" "(describe)")
- (action_tile "new_view" "(new_view)")
- (cond
- ((= what_next1 3)
- (new_view)
- (if (/= 3 what_next1) (setq what_next (start_dialog)))
- )
- (t (setq what_next (start_dialog)))
- )
- (cond
- ((= 2 what_next)
- (setq x1y1 (getpoint "\n▓─ 1 ¿ñ┬I: "))
- (setq x2y2 (getcorner x1y1 "\n╣∩¿ñ┬I: "))
- )
- )
- )
- (if (= 1 what_next)
- (progn
- (foreach n delete_list
- (command "_.VIEW" "_D" n)
- )
- (foreach n new_names
- (if (cdr n)
- (command "_.VIEW" "_W" (car n) (list (nth 1 n) (nth 2 n))
- (list (nth 3 n) (nth 4 n))
- )
- (command "_.VIEW" "_S" (car n))
- )
- )
- ;; Only restore the view if it is not *CURRENT* or nil.
- (if (not (or (not restore_view)
- (= restore_view "* Ñ╪½e *")
- ))
- (command "_.VIEW" "_R" restore_view)
- )
- )
- )
- )
-
- ;; Set up error function.
- (setq old_cmd (getvar "cmdecho") ; save current setting of cmdecho
- old_error *error* ; save current error function
- *error* ai_error ; new error function
- )
-
- (setvar "cmdecho" 0)
-
- (cond
- ( (not (ai_notrans))) ; transparent not OK
- ( (not (ai_acadapp))) ; ACADAPP.EXP xloaded?
- ( (not (setq dcl_id (ai_dcl "ddview")))) ; is .DCL file loaded?
- (t
- (ai_undo_push)
- (ddview_main) ; proceed!
- (ai_undo_pop)
- )
- )
-
- (setq *error* old_error)
- (setvar "cmdecho" old_cmd)
- (princ)
- )
-
- ;;;----------------------------------------------------------------------------
- (princ " íuDDVIEWívñw╕ⁿñJíC")
- (princ)
-