Monday, January 20, 2020

Linked DWG Xref Overlay vs Attached Bug - Part Two

Two options exists to work around this situation (last post). One is easy and Revit focused but depends on the AutoCAD user a little and the second is impractical and depends on the AutoCAD user entirely.
  • Xrefs on their own layer
  • Xrefs always unloaded
If we can count on the AutoCAD user being consistent to assign all of the file's xrefs to a unique layer not shared by any other elements then we can still turn off the overlay xref when it shows up. This shouldn't be too difficult to achieve and many firms already have that standard for xrefs.

If the xref's are always unloaded before closing a file then they won't show up in a Revit project. That's pretty unlikely. It's inconvenient for AutoCAD users and forgetting just once and the system fails.

Monday, January 13, 2020

Linked DWG Xref Overlay vs Attached Bug

Revit has long understood the difference between a DWG having an attached or overlay external reference (Xref). It uses the same logic for its own linking behavior for RVT files. Recently a client began reporting seeing DWG files including Xref layers in Object Styles and Visibility/Graphics even though the DWG has only an overlay Xref. Revit seems to be converting the overlay Xref to a block element and including it and all the layers in the process.

We noticed it happening first with projects hosted on BIM360. That led me to consider it was because this firm isn't using Autodesk Desktop Connector. Not too surprising considering Autodesk recommends using it for linked DWG support on BIM360.

That's irrelevant now that I've reproduced it on a project file based on a stock template, doesn't use worksets and the all files are on a single PC. It's related to how Revit is reloading the linked DWG when a new session of Revit is opened.

It seems to matter that it is a new session of Revit, opening the project again, and to a lesser degree if there are changes in the DWG file. Any of those conditions seems to be enough to find an overlay Xref(s) showing up but reporting as a block element with Query. It is pretty easy to reproduce now that I've done it a few times.
  • Start a new project
  • Link a DWG with an Xref (overlay)
  • Save the project > close it and the Revit session
  • Open Revit again
  • Open project (xref is now visible)
Variables:
  • When the project is opened and the linked DWG has changes it will load the xref too.
  • If after opening the Revit project the file looks correct using Reload From will display the xref afterward.
The images that follow are captured using Revit 2020.2. In this version using Reload From fixed it, a couple times but not every time. I've also run through this with 2018.3 and 2016 with similar results. I didn't try 2019 or 2017 because they are not installed on this particular PC.

This is the mockup DWG files.


This is the result of linking the file into a Revit project.


This is what happens after opening Revit and the project again.


This is what Revit's Query feature reports when selecting a line that belongs to the overlay Xref in the linked DWG.


It also occurred to me that it could happen if the host file's Xref was originally attached, when it was linked to Revit and changed afterward. Testing didn't support that theory. The example above is based on a xref that was placed as an overlay from the start, not changed to overlay. It also occurred to me that it might be related to large coordinate values. Civil files are linked here primarily. To rule that out, the mock up I show above is at the WCS origin and linked origin to origin.

This particular firm uses Civil 3D/AutoCAD for their civil and landscape disciplines so eliminating DWG files isn't in their future. This bug is annoying AND increasing the time required to prepare projects for plotting and publishing.

Assuming this isn't being caused by some aspect of this firm's EyeTee implementation (PC configuration and/or security measures) I'd love to hear some corroboration.