[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Which Variable Controls Xref Layer Properties?
Tip# 4238 By Phil Clark On 06-Jan-2014
3.5
Rated By 2 users
Categories : Layer Tools
Software type : AutoCAD 2014
Rename File To : No Files to download.
VisRetain controls everything visual about your drawing.

Phil Clark explains what the AutoCAD variable VisRetain can do for you.

"A lot of AutoCAD support inquiries begin with 'What's that system variable…' Users have a specific option in mind and recall that it is controlled by a system variable, but can't remember which one. In terms of frequency, the all-time winner has to be, 'What's that system variable that controls my xref layer properties?'

"The answer is VisRetain. When set to 0, layer settings in the xref take precedence. When set to 1, layer settings in the current drawing take precedence.

"For example: Assume layer DIM is red in the xref drawing, MY_XREF.DWG. In the current drawing (the one MY_XREF is xref'd into), if VISRETAIN is set to 0, the objects on that layer will be red regardless of settings in the current drawing. However, if VISRETAIN is set to 1 and MY_XREF|DIM is changed to blue, the objects will be blue."

Notes from Cadalyst tip reviewer Brian Benton: VisRetain is very important; it controls everything visual about your drawing. Users will almost never turn it off, typically. However, it can help you to reset your drawing's layer settings. When VisRetain is on, it will inherit the layer settings of a referenced drawing upon insertion. After that, all layer settings are controlled by the drawing file. If Visretain is off, the layer settings of the referenced files are controlled by the reference file itself.

That can be helpful — and dangerous. Helpful in that one file controls how it will look everywhere; just change the base file and your drawings will update. However, that is also the dangerous part. If you have customized your layer settings, you don't want somebody else randomly changing the way your drawing looks. If it's turned on, turn it off to reset your layer settings to match the source file. It can be a sort of "reset" if you don't like what was done.

 

Average Rating:
3.5


User comments
Comment by Connolly,Levi
Posted on 2014-01-07 15:45:49
This is a great variable to have in the arsenal. When I use it I set the variable to 0 reload the xref, and then set the variable back to 1. if you leave it at 0 every time you open the drawing or reload the xref, it will revert back to the xref's current layer state.