Layer Properties Per Viewport

by Donnie Gladfelter on January 3, 2008

in AutoCAD 2008

For the past couple weeks The CAD Geek Blog has been rather quiet.  Rest assured I haven’t abandoned my little corner of the CAD blogosphere, but rather took a little end-of-year vacation (Dec 17-Jan 1).  I started my vacation with grand plans of blogging almost non-stop, and finding new ways to break AutoCAD and Civil 3D.  What actually happened was a lot of Christmas shopping, followed by a number of excursions.

Proclaimed as the birthplace of the Tacky Christmas Light Tour, I had a chance to visit the many tacky homes in and around Richmond, VA.  My mothers home is among those on the Richmond Tacky Light Tour.  Getting Christmas off to a somewhat comical start was me attempting to calculate and balance the electrical load for her light display.  2-30 Amp and 2-20 Amp breakers later – we had lights!

Other highlights of my long Christmas break included visiting Baltimore, MD for their Miracle on 34th Street; Newport News, VA for their Celebration in Lights, and Virginia Beach, VA for their Holiday Lights on the Boardwalk.  Finally I had the pleasure of bringing in the new year with my favorite band – Carbon Leaf.  Needless to say, all that fun didn’t leave much time for blogging.  But 2008 is here, and so am I!

AutoCAD 2008 introduced a handy feature for managing layers properties on a viewport-by-viewport basis.  Pre-2008 we could only freeze and thaw per viewport, but now we can change Color, Linetype, Lineweight, and Plot Style.  In the short time we have had 2008 installed, the feature has already proven helpful a number of times.  So just how does one use this feature?

Below is a quick look at the Layer Properties Manager when clicked into a viewport.  You’ll notice the additional columns to the right.  Each of the columns prefixed with a "VP" can be overridden on a viewport-by-viewport basis.  That means you can display the same layer with two different linetypes in adjoining viewports.

image

By default the Color and VP Color columns are the same, Linetype and VP Linetype the same, etc… With any viewport active you can open the layer properties manager, modifying its display properties in only that viewport.

So let’s say I change the color of my Storm Pipe Text layer C-STRM-PIPE-TEXT from Cyan to Magenta.

image

Notice when I change the VP Color column from Cyan (it’s default) to Magenta, the Name, Color, and VP Color columns are highlighted with a light-blue background.  This is a visual cue letting you know the color has been overridden for that viewport.

While changing layer properties within a single viewport may be pretty straightforward for many, what about resetting things back to their defaults? Assuming you are an hourly employee you could always look at each layer, insuring the overall drawing properties match the VP properties, but certainly there’s a better way!?!

image

Funny you should ask – there is indeed a better way.  Right-clicking on a given layer will give you the option to "Remove Viewport Overrides for" either "Selected Layers" or "All Layers".  Finally you are given the option to reset either your selected layers or all layers "In the Current Viewport Only", or not only the current viewport, but rather "All Viewports".

 

Happy New Year!

  • Jason

    I am running 2009. I can freeze by viewport but when I change layer or color it does not show up on my screen. Plot preview does not pick it up either. Even more frustrating, others in my office can open the same drawing and see the changes I made. I however cannot.

    • http://intensedebate.com/people/dgladfelter dgladfelter

      If you double-click into your viewport and open the Layers palette do you see any layers with a light-blue background? The light-blue means someone has overridden the properties of that layer. Since it's so easy to fall into the trap of accidental overrides, I personally recommend to ALWAYS manage your layers from model space. Managing layers is in my opinion the safest method of layer management. Unless it's a special circumstance, I don't even use the freeze by viewport option. Instead I create a file for each "layer configuration".

    • Steve

      Jason,
      Did you ever figure this out? I’m having the same problem.

      • http://www.thecadgeek.com Donnie Gladfelter

        Steve – I trust you read my initial reply to Jason. Some other things to investigate is the VISRETAIN variable. Also I have solved a very large number of issues like this one using the RECOVERALL command to make sure my drawing (and the drawings referenced into it) are free of errors. Hope that helps you!

  • Jason

    I am running 2009. I can freeze by viewport but when I change layer or color it does not show up on my screen. Plot preview does not pick it up either. Even more frustrating, others in my office can open the same drawing and see the changes I made. I however cannot.

    • http://thecadgeek.com/ Donnie Gladfelter

      If you double-click into your viewport and open the Layers palette do you see any layers with a light-blue background? The light-blue means someone has overridden the properties of that layer. Since it's so easy to fall into the trap of accidental overrides, I personally recommend to ALWAYS manage your layers from model space. Managing layers is in my opinion the safest method of layer management. Unless it's a special circumstance, I don't even use the freeze by viewport option. Instead I create a file for each "layer configuration".

    • Steve

      Jason,
      Did you ever figure this out? I’m having the same problem.

      • http://thecadgeek.com/ Donnie Gladfelter

        Steve – I trust you read my initial reply to Jason. Some other things to investigate is the VISRETAIN variable. Also I have solved a very large number of issues like this one using the RECOVERALL command to make sure my drawing (and the drawings referenced into it) are free of errors. Hope that helps you!

  • Reliq

    Angela,

    Could also be your PICKFIRST variable got set to 0, thats what allows you to select an object first, then execute a command on that object.

  • Reliq

    Angela,

    Could also be your PICKFIRST variable got set to 0, thats what allows you to select an object first, then execute a command on that object.

  • angela

    i execute with the shortcut. the other user (on the other computer) uses the tool bar. i would assume if he uses the shortcut it would still execute the same way on his program. it’s got to be some internal setting right?

  • angela

    i execute with the shortcut. the other user (on the other computer) uses the tool bar. i would assume if he uses the shortcut it would still execute the same way on his program. it’s got to be some internal setting right?

  • angela

    we have autocad 09 in the office and the match properties is different on 2 different computers -how do i get the one to act like the old match properties where you select the layer you want -THEN hit the line you want to match the first layer you selected?

    on the “faulty” computer you have to select the line you want to change first, then hit the one you want to change it to and it doesn’t take all the properties with the line!!! how do i set it to the old school -good ol way of matching properties?? one 09 can do it and the other i can’t figure out!!

    • http://www.thecadgeek.com Donnie Gladfelter

      Angela – How are you executing the Match Properties command; by icon, MA alias, or by entering MATCHPROP at the command line? In this case there’s no logical reason the command should work on one computer, but not another. The first thing I would check is to see if the broken computer has a LISP or something loading. LISP’s are loaded after the PGP file (containing command aliases like MA), and thus it’s possible a LISP is hijacking the MATCHPROP command. Check for lisps in support directories that may be loading automatically, the appload command, even CUI’s. Not sure if that solves your problem, but hopefully gets you going down the right path.

      Donnie

  • angela

    we have autocad 09 in the office and the match properties is different on 2 different computers -how do i get the one to act like the old match properties where you select the layer you want -THEN hit the line you want to match the first layer you selected?

    on the “faulty” computer you have to select the line you want to change first, then hit the one you want to change it to and it doesn’t take all the properties with the line!!! how do i set it to the old school -good ol way of matching properties?? one 09 can do it and the other i can’t figure out!!

    • http://thecadgeek.com/ Donnie Gladfelter

      Angela – How are you executing the Match Properties command; by icon, MA alias, or by entering MATCHPROP at the command line? In this case there’s no logical reason the command should work on one computer, but not another. The first thing I would check is to see if the broken computer has a LISP or something loading. LISP’s are loaded after the PGP file (containing command aliases like MA), and thus it’s possible a LISP is hijacking the MATCHPROP command. Check for lisps in support directories that may be loading automatically, the appload command, even CUI’s. Not sure if that solves your problem, but hopefully gets you going down the right path.

      Donnie

  • Becca

    I have a problem with layers “unfreezing” themselves in my veiwports. This happens after I save and close the file, and reopen it later to find all the layers in the port are unfrozen. (Now I have to go through and make sure all the specific layers that should be frozen are frozen.) These layers also happen to be part of an xref. I am not sure why this happens, it only has been happening with this one project – other projects don’t do this. Any ideas/suggestions? Thanks!

    • http://www.thecadgeek.com Donnie Gladfelter

      Becca – My first guess would be the VISRETAIN variable. It’s default value is 1, but it may have gotten changed to 0.
      0 The layer table, as stored in the reference drawing (xref), takes precedence. Changes made to xref-dependent layers in the current drawing are valid in the current session only and are not saved with the drawing. When the current drawing is reopened, the layer table is reloaded from the reference drawing and the current drawing reflects those settings. The layer settings affected are On, Off, Freeze, Thaw, Color, Ltype, LWeight, and PStyle (available only in named-plot style drawings).
      1 Xref-dependent layer changes made in the current drawing take precedence. Layer settings are saved with the current drawing’s layer table and persist from session to session.

      • Jay

        So there any way to resolve this? Im having the same problem as Becca.

        • http://www.thecadgeek.com Donnie Gladfelter

          Jay – Did setting VISRETAIN to 1 not work for you?

  • Becca

    I have a problem with layers “unfreezing” themselves in my veiwports. This happens after I save and close the file, and reopen it later to find all the layers in the port are unfrozen. (Now I have to go through and make sure all the specific layers that should be frozen are frozen.) These layers also happen to be part of an xref. I am not sure why this happens, it only has been happening with this one project – other projects don’t do this. Any ideas/suggestions? Thanks!

    • http://thecadgeek.com/ Donnie Gladfelter

      Becca – My first guess would be the VISRETAIN variable. It’s default value is 1, but it may have gotten changed to 0.
      0 The layer table, as stored in the reference drawing (xref), takes precedence. Changes made to xref-dependent layers in the current drawing are valid in the current session only and are not saved with the drawing. When the current drawing is reopened, the layer table is reloaded from the reference drawing and the current drawing reflects those settings. The layer settings affected are On, Off, Freeze, Thaw, Color, Ltype, LWeight, and PStyle (available only in named-plot style drawings).
      1 Xref-dependent layer changes made in the current drawing take precedence. Layer settings are saved with the current drawing’s layer table and persist from session to session.

      • Jay

        So there any way to resolve this? Im having the same problem as Becca.

        • http://thecadgeek.com/ Donnie Gladfelter

          Jay – Did setting VISRETAIN to 1 not work for you?

Previous post:

Next post: