(defun c:foo
(/ ad co e el o s vc
) ;; RJP » 2019-01-23
;; Matches viewport properties to all layouts if target has a similar center location
;; Is it a viewport?
;; Check if there are layer overrides in the selected viewport
;; Get the center of the vieport selected
;; Select all paperspace viewports in drawing and remove the source
(ssdel e
(setq s
(ssget "_X" '
((0 .
"VIEWPORT") (-4 .
"!=") (69 .
1))))) )
;; If the center point is within a fuzz value of 1
;; Copy the source viewport
ad
'copyobjects
t
)
)
)
;; Matchpprop won't match from tab to tab but will from drawing to drawing .. go figure.
;; Make sure we're in paperspace
;; Ugly but seems to work
(command "_.matchprop" (vlax
-vla
-object
->ename co
) x
"") ;; Delete the copied viewport
;; Print the tab name
)
)
)
)
)
)