Select Revit Element by Face

Hi Everyone,

I’ve built a script which I’m using to select a Revit element and then cut out any intersecting voids, turn the resulting member into an assembly, orient the assembly to a selected face, and then create views of the assembly.
This is to assist us in creating shop drawings for structural elements.

At the moment, I have to select the overall element for dynamo to work with, and then have to select a face separately for the orientation part of the script to work. Is there a way to select just the face from the start, and then for dynamo to detect the element which that face is a part of? Then I would only need to select a single face for the entire script to run, halving the amount of input I need to make.

Thanks in advance,

Hello,
You can try Element.FromDynamoSurface in Springs package.

Thanks Joan,

Sounds like the Element.FromDynamoSurface node is the go, I found it in the clockwork package - is that the one you meant?

I’ve substituted it into my script, but the output doesn’t seem to work properly. Any ideas?

Yes, that´s the node I meant but it semms not to work with structural conections. You can also try selecting all the elements in category and filter those with geometry intersecting the face. Something like this.
.

Hi @rad1cal,

Maybe this thread can help you.
https://forum.dynamobim.com/t/assembly-modify-origin/11433/7?u=mjb-online

Kind regards,
Mark

Thanks Mark, that’s the thread which gave me the original idea for the re-orientation part of the script. I ended up using the Orient to Face method in my script.

Thanks Joan,
That seems to work, but I have several thousand bolts (i.e. structural connections) in my project, and checking each plate against every bolt in the project severely slows down the script. I think I really need to stick with the “surrounding elements” method, this instantly reduces the number of intersect checks the script needs to run (unless there’s a better way to accomplish this!).

I can’t for the life of me understand why the Element.FromDynamoSurface node doesn’t like Structural Connections.

If I can’t easily accomplish what I want by just using the starting face of the element, I guess I’ll just have to continue picking both the element and face for every component, which isn’t really that big of a deal in the big scheme of things.