View Full Version : Xref layer color change
jsnow
2009-02-25, 08:44 PM
I have a dwg xref'ed into another drawing. If I open the xref and change a layer color when I go back into the drawing it is xref'ed into the layer color does not change.
Yes it has been reloaded, it shows the current time that it was upated in the xref manager. If I make any other changes in the drawing like draw a line those changes are all updated just not the layer color change. Very confusing.
jaberwok
2009-02-25, 08:47 PM
Check the value of VISRETAIN. I think you want it to be = 0. Of course, you might want to change it back to = 1 after the colour change has registered.
jsnow
2009-02-25, 10:38 PM
That worked thanks.
Every drawing that I have this particular xref in I am having to set the vistrain setvar to 0 for them to update, the problem with that is it turns all the layers that I have frozen in the viewports and there are a lot of layers and a lot of drawings so a bit time consuming.
So why would I have to change the setvar on this drawing that I am xrefing it in and I don't need to change that setvar in other drawings that I have xrefs (other xrefs) in?
gandocadguy
2009-02-26, 02:33 PM
VISRETAIN is a drawing vairable and applies only to the drawing it's set in. It must be set for every drawing.
Depending on your use of the xref layer colors and other properties this is desirable to not change based on the Xref's layer setting but rather the layer settings applied in the file.
Example:
I xref a survey and want it screened. I set all xref layers to color 8. If VISRETAIN is set to 1 then this will not hold and will go back to the xref colors.
An easy way for you to do what you need is make a button to set the layer to the color you'd like.
irneb
2009-03-04, 04:35 PM
Only way I can think of to do this (without programming) is to use Layer States. Create a layer state before setting VISRETAIN=0 and reloading, then export so it doesn't update because of VISRETAIN. Do the VISRETAIN=0, reload, VISRETAIN=1. Layer state -> import overwriting the existing state. Uncheck the colours check box (and any others you want the same as in the xref), click Restore.
If you have VPFreezes, you may have to perform a layer state for each ... :cry:
cadtag
2009-03-04, 06:06 PM
In the xref file, rename the layer to something bizarre and easily rememberable, then save the drawing.
then, open the destination drwing, and it will find the new name and maintain the properties that were set in the xref file. then go back, rename the layer in the Xref file to the 'proper' name, and reload the xref. It should now show the correct name, with properties matching what you want.
jaberwok
2009-03-04, 07:43 PM
In the xref file, rename the layer to something bizarre and easily rememberable, then save the drawing.
then, open the destination drwing, and it will find the new name and maintain the properties that were set in the xref file. then go back, rename the layer in the Xref file to the 'proper' name, and reload the xref. It should now show the correct name, with properties matching what you want.
Nice one. Good tip.
irneb
2009-03-05, 05:00 AM
So why would I have to change the setvar on this drawing that I am xrefing it in and I don't need to change that setvar in other drawings that I have xrefs (other xrefs) in?That's because VISRETAIN=1 basically tells ACad, you want to modify the XReffed layer properties in this drawing (without affecting the XRef source) and you want to keep your changes for prosterity. What actually happens is that a copy of each of the XReffed-in layers are saved in the current drawing. These are used to display the xref linework in this drawing, so when you change a property of a layer of the xref, you're actually changing the layer's copy instead (that's how you freeze / thaw in your case).
Unfortunately the VISRETAIN is an all or nothing setting. You can't for example say: "Reload the color property from all the xrefed layers only, but leave the rest of the properties as is." Would be nice, but as yet ACad don't have such capability.
In the xref file, rename the layer to something bizarre and easily rememberable, then save the drawing.
then, open the destination drwing, and it will find the new name and maintain the properties that were set in the xref file. then go back, rename the layer in the Xref file to the 'proper' name, and reload the xref. It should now show the correct name, with properties matching what you want.Not exactly sure if this may not be more work? And you're still loosing the Freeze / Thaw, On/Off, etc. Basically you're tricking ACad into thinking a layer has been deleted & a new one created. So the copy is deleted & a new copy is made as per the xref source's properties. Still reverts to ALL the properties of the source, not just the color. At last this does only the layers you want to reload ... not all the layers. But if you need to do this for each layer, wouldn't it have been simpler just to change the color of the XRefed layer copy?
tracy.findlater
2009-03-05, 10:16 AM
I would just delete the Xref and reattach and use the layer state manager
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.