Elements from a linked model

Hi all,

I`m struggling to select only the elements (from a linked model) visible in the active view.

I tried using the BoundingBox node but it doesn’t work if the object is hidden using the visibility tool in revit (VV), if the element is inside the section box it will be selected, being hidden in revit or not. (example below)

Is there a way to bring only the ones that are visible using the visibility tool in Revit?

Hi @fcastellonVRK5P ,

I know that Genius Loci has a node that might suit your needs: “SelectByCategoryInHostView”.
I don’t know if that node filters out elements which are hidden, but using some nodes afterwards, i.e. the Elements.IsHiddenInView node from the Rhythm Package should help filter those quite easily.

PS: I find it hard to follow what you’re trying to do in your screenshot. For example what is going on before/after the if-node?

If you need to select all objects in a view you can use DS.All Elements In View(s) by Synthesize package or Collect.ElementsInView by Springs.
I prefer Synthesize, never had issues with it and I select elements visible in view all the time.

dont think it will work on link if link element is hidden in view[right click hide in view] …their only way i could get it to work in that situation was with some raybounce…
Revit_zV3qAdV6wg

You could try using bool masks and “all elements of category” as source. That usually displays hidden elements too I think.

probably i misunderstand…think user only will see these component there are visible from link…here in my exemple i had 4 active walls…no probblem, and then a situation with a link instance copied 3 times and then hide some of these walls in view,in that situation i only could make it to work with raybounce…hope it make sense :wink: not sure what you mean, could you give an example ?



Hmmm. Not sure anymore then. Try using different selection method that is not “active element”. Here’s just one of those.
In this one I got all elements from the view and then used my preferred selection method to select one or more element.

To use the advantages of using active view if you need this done in multiple spots - just plug in active view node in the beginning instead of “views”

thats will not work on linked walls example…it will only give the linkinstance itself i guess

the tricky thing here is when a link instance is copied they all still have the same guid+id, think thats why i only can get to work with raybounce, probably someone know a good way here

Hi Daan,

I tried this but I think that maybe because the elements are from a linked model, it doesnt matter if it is hidden or not, the nodes are always showing as not hidden even if it is not visible in revit.
The nodes before the if are just a workaround I found here in another topic, it only makes the view refresh when I run the script.

Hi Sovietek,

This seems to be what I need, can you share the rest of the script? I never really worked with raybounce, but if I can see you example I can probably figure it out.

Thanks

1 Like

Hi @fcastellonVRK5P it was just a rough example on linked wall, you will need some modify in your example…good luck and lets us know if you fall over a better way :wink:

1 Like

Hi @sovitek, thanks this works but as I understood it returns the elements that are hit by the ray bounce, so if a wall (for example) is far from the centroid point used to generate the raybounce, it might happen this wall will fall between the “rays” and not show on the list.

1 Like

Yes exackly, but could probably get sorted with a distance , closest point etc…not sure give it a try later…btw honestly i dont like that kind of hide in view :wink: