I have a script that takes pipes and generic models from a view using the “Element in View(s)” node. Its been working fine for a while now but for some reason it’s picking up an extra pipe in one of the views as shown below.
The View affected has been un-cropped just to show you the extra pipe being picked up:
Here is the script picking up four pipes instead of three:
I’ve tried several different elements in view nodes and even a python script that uses bounding boxes around the MH generic models and it still picks it up. I’m a bit clueless at the moment so if anyone could help me out I would appreciate it!
I’ve attached the dynamo script below - the revit file is too big sorry!
Elements in view test.dyn (15.9 KB)
Ok I’ve figured out why the extra pipe is being picked up but now I still don’t know how to get rid of it. The reason is because the piping system boundary is crossing into the view and for some reason it’s still picking up the pipe that’s in the system:
I’ve found a work around where i hide everything off in the view apart from what is necessary (the three pipes and MH family in this case) and then running the script works.
The problem with this is that I’m in the process of making an automated MH schedule and part of this automation is to create a view over each MH which i’ve managed to do - but to automatically hide everything off apart from what is needed i don’t think is possible.
Any suggestions would be appreciated!
If anyone would like to know, just so I can conclude the thread, I’ve gone down a new route. Instead of collecting the pipes using the Elements in View(s) node, I’ve collected them using the Geometry.DoesIntersect node.
Don’t think the view way will work as even when using filters to hide of pipe systems they still come up.
I think the new way is a better work flow / less prone to errors anyway so i’m happy with it.