TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: vnanhvu on June 16, 2011, 10:34:39 PM

Title: Freeze & Reset layers
Post by: vnanhvu on June 16, 2011, 10:34:39 PM
Hi !
I hope you can help me this command. I usually VPLAYER for " Freeze " & " Reset" layers in layout. If my objects in model, VPLAYER make reset 1 layer only, but not Reset all Freezed Layers. And special i cant reset XREF'S LAYERS. I try with LAYERP command, only restore previous layer, not Restore all Freezed Layers.
Thank you very much !
Title: Re: Freeze & Reset layers
Post by: CAB on June 16, 2011, 11:05:49 PM
What about this?
Code: [Select]
Command: -layer

Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte]: t

Enter name list of layer(s) to thaw: *
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte]:
Title: Re: Freeze & Reset layers
Post by: vnanhvu on June 17, 2011, 02:33:22 AM
Thanks CAB. But my problem not resolved. hix... Thanks again  :-(
Title: Re: Freeze & Reset layers
Post by: kruuger on June 17, 2011, 03:51:53 AM
Thanks CAB. But my problem not resolved. hix... Thanks again  :-(
try again. CAB solution work fine on drawing and XREF layer (in model space)
you can also use _LAYTHW.
kruuer
Title: Re: Freeze & Reset layers
Post by: CAB on June 17, 2011, 07:24:28 AM
Thanks CAB. But my problem not resolved. hix... Thanks again  :-(
Perhaps you can explain your problem in more detail?

There are several routines here to isolate layers & then reverse the process.
Is that what you are trying to do?

The command -layer thaw * will thaw All layers.

That is not what you want?
Title: Re: Freeze & Reset layers
Post by: jbuzbee on June 17, 2011, 10:17:37 AM
Are you trying to set certain layers according to a "standard"?  Is this like a floor plan, ceiling plan, etc.?
Title: Re: Freeze & Reset layers
Post by: Crank on June 18, 2011, 12:37:54 PM
The VPLAYER command includes the hidden keyword option reMoveoverrides. You won't see this keyword in the list of options but if you enter M at the initial VPLAYER prompt, you'll get a sub-prompt of options to remove one or all types of layer property overrides. You can choose which layers these overrides should be removed from and in which viewports.
Title: Re: Freeze & Reset layers
Post by: vnanhvu on June 19, 2011, 06:00:05 AM
Example: in my draw, model have 3 layers: a1, a2, a3. I xattach 1 file also have 3 layers : a1,  a2,  a3. I start creat mview, i have both a1, a2, a3 (model) and a1, a2, a3 ( xref ) in frame viewport.
First  i  hide a1 in xref, and continue reenter hide a2 in xref ( i use command: LAYFRZ ). When i unhide all, if i know name a1, a2 exactly, i use VPLAYER > reset a1 and reset a2, if i use LAYERP i only unhide a2, and reenter LAYERP unhide a1.
What do you have command unhide all ( unhide a1 a2.... same time ).
Thank you very much !
Title: Re: Freeze & Reset layers
Post by: Crank on June 19, 2011, 05:00:45 PM
It appears that VPLAYER has a bug: It uses a loop, so LAYERP will only restore the last action.

To get around this you can save a layerstate before the VPLAYER command and restore this layerstate when you need it.