I have a base drawing with several attached, full pathed dwgs in it. I have changed all the layer colors, line types, and line weights to the exact way i want them.
I then XREF attach that "master" drawing into my sheet/production dwgs. The "master" xref layer states all revert back to their original state.
I have have changed the following variables:
(setvar "VISRETAINMODE" 2047)
(setvar "VISRETAIN" 1)
(setvar "XREFOVERRIDE" 1)
I am working on Civil 3D 2023.3.1
I want the layer overrides I make in the "master" base file to retain throughout all attachments of that file into my production drawings.
I do not remember this ever happening in the past. I would set the master base dwg and the layer overrides would stay.
TIA.
***edit***
I followed this help article
Xref layer properties lost or reset when reopening a drawing in AutoCAD (autodesk.com)
This is exactly how layering has always worked. Source file layer settings are always utilized when xrefs are attached, even when nested. If you go to the help articles on it, it explains your scenario and how the layers react with nested xrefs
https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Maintaining-layer-...
Basic summary is that you should create a layerstate in your master file, export it, and then import it into your child files and apply it if you want to transfer the layer settings from the master file.
I wish it could work differently, perhaps a variable similar to VISRETAIN that if an xref is attached and nested, the original layers are ignored, and the layers from the intermediate file are what are held.
Christopher T. Cowgill, P.E.
AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2022 on Windows 10
Please select the Accept as Solution button if my post solves your issue or answers your question.
You have to understand the layer states in your master file will only apply in that file. They will not be dynamic when the master file is xref'd into other files. That is the way visretain works. It only applies to the individual source files, not a host file. If you xref the master file into other files with visretain=0, the layer states will be controlled by the files attached to the master file, not by the master file itself. You cannot make Autocad do what you are wanting. Microstation does work that way but not Autocad. I wish it did because it would greatly simplify our workflows.
Can't find what you're looking for? Ask the community or share your knowledge.