Message 1 of 2
Erase selected objects from all paperspace tabs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following routine will copy a selected object to ALL paperspace tabs. Is there a way to change this code to erase the object picked on one sheet, on all other paperspace tabs? Feel free to use this code if you don't have the "copy to tabs" routine...
(defun c:c2t (/ ss sslist doc tabs)
(if (and (= (getvar "cvport") 1)
(setq ss (ssget))
)
(progn
(while (> (sslength ss) 0)
(setq sslist (cons (vlax-ename->vla-object (ssname ss 0)) sslist))
(ssdel (ssname ss 0) ss)
)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
tabs (vla-get-layouts doc))
(vlax-for tab tabs
(if (and (not (eq (setq name (vla-get-name tab)) "Model"))
(not (eq name (getvar "ctab")))
)
(vlax-invoke doc 'copyobjects sslist (vla-get-block tab) 'pairs)
)
)
)
)
(princ)
)