Is it possible to enable layers for specific viewports?

Is it possible to enable layers for specific viewports?

Anonymous
Not applicable
7,252 Views
15 Replies
Message 1 of 16

Is it possible to enable layers for specific viewports?

Anonymous
Not applicable

I had naively thought that I would be able to enable different layers in different viewports so that I could create prints with only certain layers enabled.

 

But I cannot figure out how to do this.

 

Is this possible?

 

--wpd

 

0 Likes
Accepted solutions (1)
7,253 Views
15 Replies
Replies (15)
Message 2 of 16

ace_guru
Advocate
Advocate
Accepted solution

Only used it once, but think all you do is just activate the viewport then go through your layer list box & turn off applicable layers. 3rd icon from the left.

 

Viewport_layer.png

Message 3 of 16

h_s_walker
Mentor
Mentor

As ace_guru has correctly said you need to use the Freeze/Thaw in current viewport icon in the Layers menu,

 

You have to be physically inside the viewport though, not just in the layout the viewport is located on.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 4 of 16

pendean
Community Legend
Community Legend
Double-click inside each VIEWPORT, then start LAYER command: on the far right of that pop-up are columns with VP headings, those control layer settings inside the viewport you are in only. Do what you want there.
Repeat for each other viewport.

Post back if you get stuck.
Message 5 of 16

kasperwuyts
Collaborator
Collaborator
I second what other peope said, but with the added note that, while a viewport is active, you can use the LAYFR command to click on any geometry, and the intire layer that geometry was on will dissapear. This might work a lot faster than messing around in the layer properties manager. (especially if you have lots of layers)

Best regards
Kasper Wuyts
_______________________________________________________________________________
If this post solves your problem, clicking the 'accept as solution' button would be greatly appreciated.
Message 6 of 16

Anonymous
Not applicable

You can also use the "VPLAYER" command.

 

I also have this lisp routine.  

 

(defun c:V0 ()
(command "undo" "mark")
(prompt
"\nSelect the Viewports to modify: ")
(setq ss (ssget))
(command "VPLAYER" "FREEZE" "*" "s" "p" "" "THAW" "*DEFPOINTS,0,*0-AR-*" "s" "p" "" "")(prin1))

 

You would need to rename the layers to match yours of course.

Message 7 of 16

Anonymous
Not applicable

Thank you for all of the tips and pointers, but I feel like I am missing something fundamental.  (Perhaps the fundamental thing I am missing is some basic training on the tool!).

 

Please forgive my ignorance, but I am confused by phrases such as "all you do is just activate the viewport", "You have to be physically inside the viewport though, not just in the layout the viewport is located on", and "Double-click inside each VIEWPORT".

 

So perhaps I should start by describing what I am trying to do...

 

I have imported a picture and am trying to trace the outlines that I see on the picture.  There is some fuzzyness to the outlines, so I would like to trace (and then dimension) the outsides of the fuzzy objects on one layer, and then trace (and dimension) the insides of the fuzzy objects on another layer.  I have (perhaps) attached a screenshot showing what I mean.

 

I would like to create a print showing the locations and dimensions of the outside traces, and a separate print showing the location and dimensions of the inside traces.

 

It is possible that I am confusing "Layouts" and "Viewports".  I was thinking that each p-space layout indicated a different print, and that I could (somehow) specify which layers would be included on that print/layout/viewport.

 

As I said, I appreciate all of the tips you folks have given me regarding this, but I am still confused (if that's not obvious by now).

 

I can click on one of the layout tabs... is that what you mean by "Activate a viewport"?

I can open the layout manager and specify which layers are visible (by clicking on the light bulb icon).  But when I switch to a different layout tab and change those, they are changed for all of the layout tabs.

 

I am not sure how to be "physically inside a viewport", and  I cannot double click inside the viewport (or, perhaps I am misunderstanding what a "viewport" is).  As soon as I click the mouse button once, the cursor displays a message saying "Specify opposite corner or ...".

 

Once again, any tips or suggestions are welcome.

 

--wpd

 

0 Likes
Message 8 of 16

h_s_walker
Mentor
Mentor

A viewport is like a window cut from a piece of paper (paperspace) and you look through that window to see the real world (modelspace)

 

To create a viewport, at the command line type MVIEW (whilst in paperspace). Now select any two points as long as they are quite away apart. You will think you are drawing a rectangle (you're not, you're cutting a hole in the paper)

 

Now anywhere inside that rectangle double click. You will see the viewport(rectangle) become thicker. You are now inside the viewport in paperspace.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 9 of 16

Anonymous
Not applicable

See attached.

Message 10 of 16

Anonymous
Not applicable

Thank you, I see what you mean now.  I am sorry to be so dense about this.

 

It seems to me that (in AutoCAD 2016) I get 2 layouts and 2 viewports "for free" with a new drawing, and that the viewports are somehow associated with layer 0.  (At least, I have found that I can now select a viewport when I click on one of the layout tabs and I have layer 0 visible, unlocked, and unfrozen).  Is my interpretation correct?

 

That is starting to make sesne to me.

 

In order to enable layers for printing within a specific viewport (or, equivalently, disable unwanted layers for printing within a viewport), would I now freeze the unwanted layers from within that selected viewport?

... and then take care never to accidentally click on the "thaw in all viewports" button I noticed somewhere in the layers tab?

 

I just tried that, and it doesn't seem to work for me, though. 😞

 

--wpd

 

0 Likes
Message 11 of 16

Anonymous
Not applicable

Make sure you click the "VpFreeze" to freeze for only the active viewport. You're getting there.

Message 12 of 16

Anonymous
Not applicable

Thank you Michael,

I think I must have done something to my drawing in order to mess things up a bit.  Once I exited (without saving) and restarted, I was able to double click on viewports and have them be selected.

 

I still seem to have something funny going on with my drawing, but it is simple enough to recreate from scratch that I'm ok with starting over.  Right now, I am trying to understand (and put together) a process for me to use this tool to make these measurments and to publish them for others to use.

 

It seems to me that the process should be something like this:

  1. Import (attach) my image on its own layer
  2. Create a layer for my outside-of-the-fuzzy-area blocks (see the image I uploaded earlier for reference, if you're so inclined)
  3. Draw my blocks on that layer
  4. Create a layer for my outside-of-the-fuzzy-area dimensions
  5. Draw my dimensions on that layer
  6. Create a layer for my inside-the-fuzzy-area blocks & draw those blocks
  7. Create a layer for my inside-the-fuzzy-area dimensions & draw those dimensions
  8. Switch to one of the paper space layout tabs and rename it "outside-the-fuzzy-area"
  9. Select the viewport for that layout tab and freeze all of the layers except the outside-the-fuzzy-area layers
  10. Switch to the other paper space layout tab and rename it "inside-the-fuzzy-area"
  11. Select the viewport for that layout tab and freeze all of the layers except the inside-the-fuzzy-area layers
  12. Take care never to click the "freeze or thaw in ALL viewports button shown in the model space tab
  13. Publish PDFs of the two paper space tabs showing the dimensions and locations of the blocks.

I think that if I do that, and take care as I do so, I should have 2 paper space layouts showing the outside-the-fuzzy-area and inside-the-fuzzy-area blocks and dimensions.

 

Does that sound right?  Am I over complicating this?

 

 

0 Likes
Message 13 of 16

Anonymous
Not applicable

You're on the right track. See the help menu for setting and restoring layer states. A layer state saves the current layer settings(on/off, frozen/thawed, color, etc.). Then, if you accidentally freeze or thaw all, you can simply restore the layer state.

Message 14 of 16

Anonymous
Not applicable

Oh dear...

It turns out this doesn't do what I wanted it to do...

It appears that simply freezing the unwanted layers doesn't prevent them from being shown in the different viewports.  I have to toggle the lightbulb icon to turn layers on and off (as always), and it appears that is a global option, not a viewport specific option.

 

So I should retitle this discussion, or start a new one entitled, "Is it possible to control which layers are visible separately for each layout tab"?

 

I am thinking the answer is "No", and the whole discussion regarding freezing and thawing layers in different viewports, while illuminating, was a bit of a red herring.

 

--wpd

 

0 Likes
Message 15 of 16

h_s_walker
Mentor
Mentor

Please look at the attached drawing.

 

The three rectangles are viewports

 

Double click in each one of them separately, and look at which icons have changed in the LAYER PROPERTIES

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 16 of 16

Anonymous
Not applicable

Thank you hwalker,

I think I must have not double clicked on the indivual viewports as I was experimenting with my drawing this morning.  What I saw was that the frozen/thawed state did not affect the visibility of the different layers.  But, after playing with your example (thank you VERY much) and then deliberately, with intent, double clicking on my viewport, I now see that freezing/thawing other layers, does, in fact, hide them.

 

I'm truly sorry for any confusion I may have caused by this thread, and extremely grateful for your (and @Anonymous's, and @Anonymous's, and @kasperwuyts's, and @pendean's) gentle instruction.

 

Thank you all.

 

--wpd

 

0 Likes