I hope you are all save at home!
We are working in a graph to create 3d views with pair of elements from a Navisworks Clash test.
We have the pair of IDs from elements in links, Before we go any further I wanted to confirm with you hidding elements in view from link is possible using dynamo???
It is possible to do it using Revit UI but the available nodes to hide elements in view I don’t recall they work with elements in link, do they???
Many thanks in advance!!!
The easiest way to do this would be through a shared parameter which is present in both the parent document and the link document. A filter can then be created in the parent document which, when its visibility is unchecked, will hide elements matching the rules of the filter in both the parent and the link.
Thanks for your comment but, in order to do what you are suggesting we should feed/update/modify elements on other parties models and we’d rather not to do that.
I’m afraid that is the only solution I can think of. Linked elements cannot be hidden using the same technique as regular elements. Through looking at the Revit API, we can see why this is.
A View has a HideElements method. In order to specify which elements we are hiding, we have to provide a list of ElementIds. For this example, let’s say we have our main project,
Document A, and our link
Document B. In order to hide elements in one of Document A’s views, we need to provide a list of ElementIds from Document A, but here’s the problem. If we want to hide elements from Document B in a view from Document A, we can’t. The link instance (Document B) is indeed an element in Document A, but this means we can only hide the entire link.
You can test this yourself by attempting to hide the elements in Revit. If you just click on the link instance in Revit, you are able to hide the element in your active view. However, if you tab through to one of the link’s elements, the option is grayed out.
With this being said, your only option is to add a shared parameter which can be used to affect the visibility of all elements in your project, regardless of whether they are part of your main document or a linked document. If you don’t want to modify documents made by other users, you will have to download a local copy of their models and modify those, however this will present a number of problems when edits are made to the active project as these will not be reflected in your local copies.