I am working with ACAD 2016.
I am trying to copy a viewport with frozen VP layer states (about 100 of 500 layers have frozen VP attributes) from one drawing layout to another layout in a different drawing. When I copy the viewport and paste it into the new layout it does not retain the layer state properties. I tried using the MATCHPROP command but that did not work.
Any suggestions? There has got to be an easy way to do this...
[ The subject line of this post has been edited for clarity by @handjonathan Original: Copying VP from one drawing to another retaining layer state properties ]
One way to do this: double click inside your viewport in the source drawing.
type in LAYERSTATE, NEW and give it a name, then export the layer state to a .LAS file.
Copy and paste the viewport in the new drawing, type in LAYERSTATE and import the LAS file you saved.
Mike
Mike,
Thanks for the quick reply... I tried what you suggested and it is not working correctly. It does not restore the states of the VP frozen layers.
More info:
I have a dwg from an architect that has phasing plans and a final plan all on one dwg. Each layout has a viewport with certain layers frozen depending on the phase on that sheet. I only need the final phase in my drawing so I have XREFed the architect's drawing into my drawing file. Then copied the viewport from the final phase layout into my drawing layout. I saved the layerstate from the viewport in the arch's drawing and restored it to the viewport in the new drawing. but i cannot get it to VP freeze the same layers from the viewport in each drawing.
Any other suggestions?
Just confirming that the layer state is set to frozen for both the VP Freeze and New VP Freeze. Copying a view port does not carry over the VP Feeze but does carry over the New VP Freeze settings. To make it easy you can sort the layers based on the VP Freeze settings then set to frozen the layers for New VP Freeze before copying the viewport
Try this modified routine, originally made by Jeff Mishler.
Instructions inside.
Edit 22-03-05: The code updated.
I have not tried this, but IIRC if you make a BLOCK out of the viewport, and copy that to a new layout, it will copy with the same layer settings.
I would presume that all layers/xref layers would have to exist in the target drawing _first_.
@jggerth wrote:
I have not tried this, but IIRC if you make a BLOCK out of the viewport, and copy that to a new layout, it will copy with the same layer settings.
I would presume that all layers/xref layers would have to exist in the target drawing _first_.
Yea this works. It's the best solution I've found so far.
@ВeekeeCZ wrote:Try this modified routine, originally made by Jeff Mishler.
Instructions inside.
I know this is really outdated, but I have tried getting this to work with no luck.
Is there something that could cause issues in newer versions of AutoCAD? (I am on 2022)
It would be super useful if I can get it to work since I have to make title sheets that I VPfreeze a ton of layers on in existing dwgs.
Not your fail, there is a bug in VPV, but simple to fix for you:
Open the .lsp, go the the second line of c:VPV and change this:
from
(setq laylist (vl-bb-set 'vpc_laylist))
to
(setq laylist (vl-bb-ref 'vpc_laylist))
Sebastian
@cadffm wrote:
Not your fail, there is a bug in VPV, but simple to fix for you:
Open the .lsp, go the the second line of c:VPV and change this:
from
(setq laylist (vl-bb-set'vpc_laylist))to
(setq laylist (vl-bb-ref 'vpc_laylist))
Thanks. Fixed and updated the original reply.
Hello, it is very useful. But I tried it, it did not work. I loaded lisp at source file, run command VPC. And then, loaded it in the target file, run vpv. It did not work. Please see the image below. Could you please provide your advice to me? Thank you very much in advance,
I guess in your target file are not all source-file layers available,
right?
This Lisp is just a simple sample of how a program extension can do the job,
use it for free without claim to support and flawless (BTN = BetterThanNothing).
The Code above is
- not ready for international versions (but you are using english version)
- working if ALL source-layers are also present in the target file (i guess that is the problem in your case?)
- ....
I won't to rewrite the whole tool, but I tried to fix these both issues, try this Version 2022/11 <attached>
Still a problem? Share your source&target DWG (and a second Screenshot with more commandlines visible [F2])
Sebastian
Thank you so much for your quick response. I am tied up right now, I will try it later and let you know the result, thanks again. 🙂
Hello, I tested it, it work well. Great job! Thank you so much! I have another situation. If some layers freeze in viewport, is it possible to turn them off or freeze them as well, thanks again.
Can't find what you're looking for? Ask the community or share your knowledge.