Layer Properties Per Viewport

|

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!

54 thoughts on “Layer Properties Per Viewport

  1. Is it possible to hide part of one layer in one viewport? Say I have created a thin rectangular prism (3x4x0.5) in model space. In the prism, I cut two holes of no particular size on one 3×4 face to the other 3×4 face. Then, in the viewport layouts, I have two viewports, one which shows the top, which is a 3×4 face, as well as both holes. The other viewport shows the 4×0.5 face. In the 2nd viewport, you can see the sides of the holes. Is there a way to hide the lines of the holes without hiding the whole prism? I know that subtracting the holes from the prism sets the holes and the prism as one layer. I am wanting the holes to only show up in the 3×4 face in the first port, but not the second port to remove clutter. Thanks!

  2. this probably wont be seen but is there a way to incorporate the layer overide into a script? i have to run this on 100+ drawings and would rather not have to do this manually.
    thanks in advance

  3. hi , i’m having one problem with viewports, if i clik in one viewport and i make changes there, like frozen layers or something, the changes appear in every viewport of that layer, how to solve this out. thanks

  4. Why viewport overrides doesn't work with standard parts (holes, bolts, nuts, others..)? If I use AMEXPLODE the override works fine. I tried to change the VISRETAIN setting but nothing happen.

  5. Why viewport overrides doesn't work with standard parts (holes, bolts, nuts, others..)? If I use AMEXPLODE the override works fine. I tried to change the VISRETAIN setting but nothing happen.

  6. 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.

    • 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 – 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!

  7. 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.

    • 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 – 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!

  8. 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?

  9. 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?

  10. 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!!

    • 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

  11. 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!!

    • 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

  12. 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!

    • 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.

  13. 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!

    • 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.

  14. Chad –

    As you’ve discovered viewports don’t copy too well. Your better option would be to use Named Views. You can set those up using the VIEW command. In addition to storing view position, the VIEW command can also store layer states (on/off).

    Donnie

  15. Chad –

    As you’ve discovered viewports don’t copy too well. Your better option would be to use Named Views. You can set those up using the VIEW command. In addition to storing view position, the VIEW command can also store layer states (on/off).

    Donnie

    • Hi Donnie,
      Are you saying VIEW will ONLY store layer states on/off? I’m wanting all the VP properties copied to another layout. If no solution, surely they should add this to new versions.

  16. We’ve been trying to copy a viewport from one sheet to another and to have it retain its settings; having all viewport layer property settings. This works if we copy it on the same sheet but it does not maintain them when we copy it to another sheet. Can you help? Thanks!

  17. We’ve been trying to copy a viewport from one sheet to another and to have it retain its settings; having all viewport layer property settings. This works if we copy it on the same sheet but it does not maintain them when we copy it to another sheet. Can you help? Thanks!

  18. @Lacrecia – You may want to take a look at publishing 2D/3D DWF’s, and using Design Review. Autodesk Labs recently came out with a plug-in that will allow you to navigate using a Ninetndo Wii Remote (good for a presentation setting?).

    Beyond that Autodesk recently made their Impression program FREE to subscription customers. Impression lets you make CAD DWG’s look more hand drawn.

  19. @Lacrecia – You may want to take a look at publishing 2D/3D DWF’s, and using Design Review. Autodesk Labs recently came out with a plug-in that will allow you to navigate using a Ninetndo Wii Remote (good for a presentation setting?).

    Beyond that Autodesk recently made their Impression program FREE to subscription customers. Impression lets you make CAD DWG’s look more hand drawn.

  20. Does anyone have a good recomendation for digital presentation boards? I figure if my CAD drawings and 3D renderings are already in CAD, is there a way to do it up nice for a presentation within CAD? My idea was to go on the Layout Tab and define several viewports to reference in raster files and of course a viewport for the floor plan too. My question now is: how do I place a shadow around the viewport to make it look nice? (to make it look like it is a samle that has been place on the board instead of just a flat picture, hope this makes sense)

  21. Does anyone have a good recomendation for digital presentation boards? I figure if my CAD drawings and 3D renderings are already in CAD, is there a way to do it up nice for a presentation within CAD? My idea was to go on the Layout Tab and define several viewports to reference in raster files and of course a viewport for the floor plan too. My question now is: how do I place a shadow around the viewport to make it look nice? (to make it look like it is a samle that has been place on the board instead of just a flat picture, hope this makes sense)

  22. I would like to use a script or Lisp file to manage the color and linetypes of layers in a viewport. I can freeze and thaw with vplayer, but it has not been upgraded to manage these other properties. Does anyone have any advice?

  23. I would like to use a script or Lisp file to manage the color and linetypes of layers in a viewport. I can freeze and thaw with vplayer, but it has not been upgraded to manage these other properties. Does anyone have any advice?

  24. Matt – only 2008 and above can do color, linestyle, etc by viewport. Good news is that you can freeze layers on a viewport by viewport basis in pre-2008 versions. One of the easiest ways to do this is to use the LAYFRZ command (express tool). Double-click into a viewport and select the layers you want to turn off (using the LAYFRZ) command, and you’ll be good.

  25. Matt – only 2008 and above can do color, linestyle, etc by viewport. Good news is that you can freeze layers on a viewport by viewport basis in pre-2008 versions. One of the easiest ways to do this is to use the LAYFRZ command (express tool). Double-click into a viewport and select the layers you want to turn off (using the LAYFRZ) command, and you’ll be good.

  26. Do you or anyone else have some help here. What about having a seperate layer visability in each viewport. I have a layout wanting to see a layer in one viewport but not another. Any ideas?

    Matt

  27. Do you or anyone else have some help here. What about having a seperate layer visability in each viewport. I have a layout wanting to see a layer in one viewport but not another. Any ideas?

    Matt

  28. Hey Donnie, could you put a print link on your articles. I really like this one but when I printed it some of the text overprinted itself. Weird.

    Thanks and Happy New Year,
    Jim

  29. Hey Donnie, could you put a print link on your articles. I really like this one but when I printed it some of the text overprinted itself. Weird.

    Thanks and Happy New Year,
    Jim