TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Amsterdammed on October 18, 2006, 10:29:41 AM

Title: Copy Layer State form Vport to Vport
Post by: Amsterdammed on October 18, 2006, 10:29:41 AM
Hello there,

I know i saw somewhere a lisp that copies the layer state from one VP to another. Anybody aware of that lisp?

Thanks in Advance

Bernd
Title: Re: Copy Layer State form Vport to Vport
Post by: Diněsaur on October 18, 2006, 10:49:56 AM
I just use the "match properties" button after I get one viewport the way I want it.
Title: Re: Copy Layer State form Vport to Vport
Post by: T.Willey on October 18, 2006, 11:13:24 AM
You could get a list of the layer names from one viewport through code, but you would have to use the command 'vplayer' to freeze them in the one you are matching to.  You can't use 'entmod' on a viewport.

Side note:  You might be able to do it with ActiveX controls, haven't tried yet, but you can change some items with ActiveX, so this might be one.  Just throwing that out there.

I just use the "match properties" button after I get one viewport the way I want it.
But if this works, no need for code.
Title: Re: Copy Layer State form Vport to Vport
Post by: Didge on October 18, 2006, 11:37:18 AM
Quote
I just use the "match properties" button

Cheers for that one Dinosaur, I never realised that match properties worked with viewport layers
(DOH!! - Slaps Head)
Title: Re: Copy Layer State form Vport to Vport
Post by: CAB on October 18, 2006, 11:42:33 AM
What if the vp is in another layout? :evil:

http://www.theswamp.org/index.php?topic=4002.0

Here is another one
http://www.theswamp.org/index.php?topic=1533.msg19303#msg19303
Title: Re: Copy Layer State form Vport to Vport
Post by: Diněsaur on October 18, 2006, 12:06:10 PM
What if the vp is in another layout? :evil:
I have gone so far as to copy a viewport from one layout tab to a second one, match the properties and erase the copy to avoid messing with layer states.  I never have become comfortable with them.
When I am first setting up my sheets, I will get the viewport layers the way I want on each type of layout tab and then copy the entire tab for new sheets and adjust the views as necessary.
Title: Re: Copy Layer State form Vport to Vport
Post by: ronjonp on October 18, 2006, 01:02:31 PM
It doesn't make sense that you can match properties between open drawings but not between tabs in a single drawing.... :ugly:
Title: Re: Copy Layer State form Vport to Vport
Post by: Krushert on October 18, 2006, 01:14:48 PM
It doesn't make sense that you can match properties between open drawings but not between tabs in a single drawing.... :ugly:
I have always scratch my head over that one.
Title: Re: Copy Layer State form Vport to Vport
Post by: Diněsaur on October 18, 2006, 04:10:35 PM
What if the vp is in another layout? :evil:
I have gone so far as to copy a viewport from one layout tab to a second one, match the properties and erase the copy to avoid messing with layer states.  I never have become comfortable with them.
When I am first setting up my sheets, I will get the viewport layers the way I want on each type of layout tab and then copy the entire tab for new sheets and adjust the views as necessary.

I just tried this or the first time using 2007.  It still works at least as long as you want to keep the same scale in each viewport.  It will NOT however save the layer settings when copying a viewport between tabs as it would with 2006 - bummer . . . that was a good trick.
Title: Re: Copy Layer State form Vport to Vport
Post by: Amsterdammed on October 20, 2006, 11:44:19 AM
I'm working with Acad 2002, Match Prop doesn't work on Vports there.

Bernd
Title: Re: Copy Layer State form Vport to Vport
Post by: Crank on October 20, 2006, 03:06:16 PM
For Acad2002 you can use the attached routine.