AutoCAD Land Desktop (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Copy viewport & retain layers

5 REPLIES 5
Reply
Message 1 of 6
tcebob
1629 Views, 5 Replies

Copy viewport & retain layers

LDT 2004

 

Does anyone have a routine to copy a viewport between layouts and retain the layer configuration?

5 REPLIES 5
Message 2 of 6
bscott
in reply to: tcebob

You have your layouts all in one file?

Bryan_S
Windows 10 Enterprise
2.40 GHz Dual Xeon Six-Core 64bit / 32gig ram
Nvidia Quadro M4000
3DConnexion CAD Mouse
Message 3 of 6
tcebob
in reply to: bscott

Yes.

Message 4 of 6
bscott
in reply to: tcebob

See attached lisp routine and try it out.  Hopefully this will get you what you are wanting.

 

The command is COPY2ALLTABS

 

Hint:  explore other "copy" capabilities of the routine besides viewports...

Bryan_S
Windows 10 Enterprise
2.40 GHz Dual Xeon Six-Core 64bit / 32gig ram
Nvidia Quadro M4000
3DConnexion CAD Mouse
Message 5 of 6
tcebob
in reply to: bscott

Thank you for the routine

 

I think this program may do more than I need. But I can cut it back -- and add a little user guidance on the way. I don't recognize the "Command: (vl-load-com)" line. Why not simply (vl-load-com)? I use LDD4 and maybe there are changes in lisp syntax since then. I'll give it a spin later today and respond again.

 

tcebob

Message 6 of 6
tcebob
in reply to: tcebob

I had a chance to try it out. Results are mixed, maybe because of a difference in version.

 

1. The "Command:" line didn't cause an error, to my surprise.

 

2. As stated in the defun, the routine attempts to copy the viewport to all layouts.

      a. The defun name is too long for practical use, so I shortened it to C2T.

      b. I really only need to copy the viewport to one layout. I'll try to incorporate a select process.

 

3. The copied viewports are, indeed, viewports. They land on the layout at the same coordinates they had on the original. However, they are empty. When I try to turn them on with Mview/on the immediate results can be bizarre. The entire screen can show the model view or a view tilted in the z axis or nothing at all. Any further interaction (keyboard or mouse) crashes Acad. Fortunately the original file is untouched.

 

tcebob

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report