
Originally Posted by
vweavers
I'm freezing the layer in the individual viewports.
I create the part in model space, and each customer gets it's own tab that may has information on individual layers (could be notes, dimensions, additional modifications, etc) turned on or off in the corresponding viewports. The average part has four tabs with 3 viewports each tab. We have about 800 current parts and growing...so it's a large task to change that many tabs and viewports when adding a layer.
Maybe 10% of drawings have an Xref- usually an inserted block with a scan/photo.
I'm not familiar either with using vpoverrides, or lisps for that matter...it's not that I'm afraid to learn, but with ACAD sometimes the learning curve is higher than what you get out of it. There appears to be several ways it COULD be done, but without the knowledge of which is easier/better, I'm trying to rely on others recommendations on how to best use my time in resolving this.. especially as this is likely not a one-time problem.
Hope that helps.
There may be a better way to achieve what you're trying to do, but here's my take on it.
What you are doing can be achieved on the command line (using the vplayer command) if you know what the "newly added" layer name is.
Quite simply you can freeze the new layer in all viewports:
command: vplayer - freeze - <type your layer name> - all - <enter>
And you can thaw that layer in selected viewports:
command: vplayer - thaw - <type your layer name> - select - <select your viewports> - <enter>
And if you're interested, here's a little (crude) lisp routine that will do what I described above:
After you appload the routine the commands are (in red) and follow the prompts on the command line:
FNL (freeze new layer)
TNL (thaw new layer)
Code:
;;new layer in viewport
(defun c:fnl (/ lyrname)
(setq lyrname (getstring "New Layer Name?"))
(command "vplayer" "f" lyrname "all" "")
(princ)
)
(defun c:tnl (/ lyrname vprts)
(setq lyrname (getstring "New Layer Name?"))
(setq vprts (ssget (prompt "Select Viewports")))
(command "vplayer" "t" lyrname "S" vprts "" "")
(princ)
)
Or.. if you want to do it all in one routine which may be easier, only need to type the new layer once:
NLYR (new layer)
Code:
;;new layer in viewport all-in-one
(defun c:nlyr (/ lyrname vprts)
(setq lyrname (getstring "New Layer Name?"))
(setq vprts (ssget (prompt "Select Viewports")))
(command "vplayer" "f" lyrname "all" "")
(command "vplayer" "t" lyrname "S" vprts "" "")
(princ)
)
Like I said, these routines are basic, and there's probably a cleaner way, but these do work.
Hope this helps.