Hello Jeremy,
I don't think view filters will do the trick. I my case I have a list of elements and I want to highlight the element the users clicks in the list.
View filters are not ment for highlighting 1 selected element, they are ment to set the visibility for a view for elements that answer to certain rules.
For example, hide or color red all walls with a width smaller then 100mm ect.
What I need is to select and highlight 1 element at the time. And I know much of the Revit user interface, and even here I can't acchieve this, so I don't think with the API I will.
I think the major problem is that the elementId of elements in a linked document aren't exposed to the main project. So, what I normally do when I want to select an element in the main project, I make an elementID set consisting of 1 element and give this list to the uidoc.Selection like this.
uidoc.Selection.SetElementIds(_elemIdSet);
Problem with elements in linked files is, I can get it's elementID, but this elementID can't be used in the main project. So what I think needs to be done is that the API gets an extra function to select elements in linkedreferences, something like:
LinkedDocumentInstance.Selection.SetElementIds(elemIdSet);
because every instance of a linkeddocument has it's own elementID in the main project, but the elements in this instance have the same elementID.
The combination that is unique is Linkend document instance elementID + object elementID.
So lets say I have a main project file. In this file I have linked IamLink.rvt and placed it 5 times. In the file IamLink.rvt is 1 wall with elementID 123456, then the combinations could be:
IamLink(1) gets elementID 111111 with element 123456
IamLink(2) gets elementID 111112 with element 123456
IamLink(3) gets elementID 111113 with element 123456
IamLink(4) gets elementID 111114 with element 123456
IamLink(5) gets elementID 111115 with element 123456
So it would be nice to have a function like:
List<ElementId> elemIdSet = new List<ElementId>();
elemIdSet.add(123456);
IamLink(4).Selection.SetElementIds(elemIdSet);