I have document A and document B linked into A.
In active view I make some elements in linked document (B) hidden.
How to get Information if given element is hidden?
Function element.isHidden(View) seems to work perfect for non-linked elements, but if I use in on elements from another document it always return false.
I also tried use:
coll = new FilteredElementCollector(linked_doc, main_doc.ActiveView.Id);
But still return hidden elements.
Thanks for any tip.
Hi Arthur
All the active documents loaded in the current Revit session can be accessed using Application.Documents() collection and this includes the linked Revit documents as well. Once you have access to the document object of the linked model (B), it might be possible to extract the same view as in doc A in doc B and then find out which element is hidden in that specific view in B.
cheers
Thank you for quick answer.
I tried this but still elements in linked file which are hidden in host view - are visible.
This is how I search view in linked file:
FilteredElementCollector viewCollector = new FilteredElementCollector(curr_doc); viewCollector.OfClass(typeof(View)); foreach (Element viewElement in viewCollector) { if (((View)viewElement).Id == main_doc.ActiveView.Id) { curr_view = (View)viewElement; break; } }
Then filer elements:
coll = new FilteredElementCollector(curr_doc, curr_view.Id);
And later in elements loop:
if(element.IsHidden(curr_view)) { /*...*/ }
Questions:
1. View in document B are reference to view from document A or it is copy?
2. If I hide element in linked file in host view, then view in linked file is automaticly updated?
Thanks
You could use the Revit 2014 custom exporter framework.
In fact, that is probably the only way to find out. Please have a look at
http://thebuildingcoder.typepad.com/blog/2013/07/graphics-pipeline-custom-exporter.html#6
Best regards,
Jeremy
Has anyone been able to make this work? Of course the intent is to be able to turn off elements in a linked model. Dale
Can't find what you're looking for? Ask the community or share your knowledge.