Jump to content
muck

Turn off layers for several view ports at once

Recommended Posts

muck

If I have several view ports in several layouts it would take

a long time to go in each vp model space and turn off vp layers.

 

Is there a way I can turn off vp layers for several viewports

all at once?

 

Thank you,

Share this post


Link to post
Share on other sites
BIGAL

Have a look at this post code by MSasu http://www.cadtutor.net/forum/showthread.php?69865-How-to-using-Lisp-to-quot-activate-quot-a-viewport where the question is "Press enter" ask change to update this mview Y N then run a defun using vplayer. The other way is to compare the viewport number to the ones you have chosen and update.

 

a test
(setq listVPorts (vl-sort (vports) '(lambda(v1 v2) (< (car v1) (car v2)))))
((1 (-49.5506 97.0527) (850.554 665.345)) (2 (9.27157 64.4326) (785.556 537.627)) (3 (-388.738 64.4326) (387.547 537.627)))
paperspace plus two view ports

Share this post


Link to post
Share on other sites
Dadgad

If the layouts are all in the same dwg, then there is only one modelspace.

If you turn them off in your layer manager, they won't display in all of your viewports.

Or you can double click into a viewport, then adjust the layers which you don't want to display in it, in the dropdown layers list, or in the layer manager, by clicking in the VP FREEZE option for each layer.

 

Once you have done that for the viewport, if you want to duplicate those layer settings in another viewport, you can either create LAYER STATES to do it, or use the MATCHPROP command. If you have (in the MATCHPROP settings dialog, selected VIEWPORT, as an available property for matching) all you need to do is start the MATCHPROP command, select the viewport whose layer state you want to copy, then select the view port to which you want to apply those layer settings.

Share this post


Link to post
Share on other sites
Cad64
you can either create LAYER STATES to do it

 

That's my preferred method.

Share this post


Link to post
Share on other sites
Dadgad
That's my preferred method.

 

Layer States have the added advantge of savability, for use another day. On the fly I typically opt for the MATCHPROP option. Using ProSteel and xrefs, there are lots of great visibility tools available, called Area Classes, but with about 900 layers in a drawing, I often use the MATCHPROP approach. :beer:

Share this post


Link to post
Share on other sites
muck

What if I have a layer in a x reference file that is shown in 20 view ports on 20 layouts.

I want to not see that layer in 19 viewports. I only want it to be shown in one view port.

Ok, I think the layer must be on in model space which allows to be on in all view ports.

I want to remove the visibility from 19 viewports without going into viewport model space for each of them

and turning that layer off. Going into each and every one of those viewport model spaces

will take a lot of time when I have big drawings. Can I quickly turn off that layer in those

19 view ports?

 

There could be case where I have 30 viewports and I want to turn the layer off in

say 20 of them. etc.

 

Is there a quick way?

 

 

Thank you,

Share this post


Link to post
Share on other sites
RobDraw

Your question is understood and answered. Have you tried ANY of the suggestions?

Share this post


Link to post
Share on other sites
muck

if you use the MATCHPROP feature can you match vp properties that are in different layouts?

Share this post


Link to post
Share on other sites
RobDraw

If I had that question, I would just try it.

Share this post


Link to post
Share on other sites
muck

I used MATCHPROP to select view port one in layout out one. MATCHPROP will ask for

the distination object which is viewport two in layout two. When I select layout two tab It will break

the MATCHPROP command so viewport two in layout two can't be selected to complete the command.

Share this post


Link to post
Share on other sites
Cad64
When I select layout two tab It will break the MATCHPROP command so viewport two in layout two can't be selected to complete the command.

 

That's why I use layer states. I can set the layer visibility the way I want in one viewport and then go through the rest of my layouts and easily set the rest of my viewports to match. But, if you want different layers visible in each viewport, you have no choice but to do it manually. There is no automatic way to make that happen.

Share this post


Link to post
Share on other sites
Dadgad
I used MATCHPROP to select view port one in layout out one. MATCHPROP will ask for

the distination object which is viewport two in layout two. When I select layout two tab It will break

the MATCHPROP command so viewport two in layout two can't be selected to complete the command.

 

I was not aware of that, as typically my dwgs are on a single layout, Cad64 knows what he is doing, I would follow his recommendations. :beer:

 

Working with ProSteel, as we are now, I frequently have as many as 200 viewports in a single layout, and I miss the good old Autocad days of one to four viewports in a single layout, and 20 or 30 layers, instead of a thousand!

Share this post


Link to post
Share on other sites
muck

I have not used layer states manager too much so I not that familiar with it.

So you can set a vp layer scheme in layer state manager and them match other

view ports with it?

Share this post


Link to post
Share on other sites
Cad64

So you can set a vp layer scheme in layer state manager and them match other view ports with it?

 

Yes, just set up your viewport with the layers set the way you want. Make sure the viewport is active and then open the layer states manager and create a New layer state. Then go to your other layouts, double click inside the viewport to make it active, open the layer states manager and click Restore.

 

See here for more information: https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-3E0F662B-226F-4A27-B5BB-D15252CC994C-htm.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×