Jump to content

Turn off layers for several view ports at once


muck

Recommended Posts

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...