Sure!
My task was - add opening family to the wall crossing pipe. I decided to achieve it using IUpdater. My solution worked good with non linked walls, I used filters to make ReferenceIntersector find only walls. But when I started preparing solution for link walls I faced problem - References from ReferenceWithContext List contains id of RevitLinkInstance, but not the id of target walls, it means I could`t gather linked walls.

I have looked throw this post https://thebuildingcoder.typepad.com/blog/2015/07/using-referenceintersector-in-linked-files.html and found that we can`t get references from linked file.
I started doing debug of my code and realized solution. The Reference class has property "LinkedElementId", if we have RevitLinkInstance and property of element in linked file - we can get the element in linked file. But when my pipe crosses the linked wall - in ReferenceWithContext list I have some amount of elements with the same ids("LinkedElementId","Id"), maybe because it also gather geometry like faces and etc. To dictinct this list I had to create custom EqualityCompare. Finally the code started working perfect . Found some bugs in code above. Here is method to gather count of intersected walls. (Note to achieve good results - need to set 3d view without section boxes). Unfortunately no time to add comments to the code. Hope it may help somebody.
Bellow Project with macro to test
public void GetWalls()
{
Reference pipeRef = this.Selection.PickObject(ObjectType.Element);
Element pipeElem = this.Document.GetElement(pipeRef);
LocationCurve lc = pipeElem.Location as LocationCurve;
Curve curve = lc.Curve;
ReferenceComparer reference1 = new ReferenceComparer();
ElementFilter filter = new
ElementCategoryFilter(BuiltInCategory.OST_Walls);
FilteredElementCollector collector = new
FilteredElementCollector(this.Document);
Func<View3D, bool> isNotTemplate = v3 => !(v3.IsTemplate);
View3D view3D = collector.OfClass(typeof(View3D)).Cast<View3D>()
.First<View3D>(isNotTemplate);
ReferenceIntersector refIntersector = new
ReferenceIntersector(filter, FindReferenceTarget.Element,
view3D);
refIntersector.FindReferencesInRevitLinks = true;
IList<ReferenceWithContext> referenceWithContext =
refIntersector.Find(curve.GetEndPoint(0), (curve as
Line).Direction);
IList<Reference> references = referenceWithContext.Select(p => p.GetReference()).Distinct(reference1).Where(p=>p.GlobalPoint.DistanceTo(curve.GetEndPoint(0))<curve.Length).ToList();
IList<Element>walls = new List<Element>();
foreach (Reference reference in references)
{
RevitLinkInstance instance = this.Document.GetElement(reference)
as RevitLinkInstance;
Document linkDoc = instance.GetLinkDocument();
Element element = linkDoc.GetElement(reference.LinkedElementId);
walls.Add(element);
}
TaskDialog.Show("Count of wall",walls.Count.ToString());
}
public class ReferenceComparer : IEqualityComparer<Reference>
{
public bool Equals(Reference x, Reference y)
{
if (x.ElementId == y.ElementId)
{
if (x.LinkedElementId == y.LinkedElementId)
{
return true;
}
return false;
}
return false;
}
public int GetHashCode(Reference obj)
{
int hashName = obj.ElementId.GetHashCode();
int hashId = obj.LinkedElementId.GetHashCode();
return hashId ^ hashId;
}
}