Air Diffusers not Hosting to Ceilings

Ok, I’ve struggled over this for days and I’m finally bringing it to the experts.
I’ve followed the code by Sean Fruin (@Sean_Fruin) about automatically creating diffusers based on spaces and ceilings. It’s great and it works, but only with the Supply Diffuser that comes with Revit because that family requires no hosting element (ceiling). But if I ever put a different diffuser for my family type, the diffusers always fall down onto the origin plane.

If I ran the script with the diffusers that work, then change those diffusers to the one I want, the diffusers will not be hosted to the ceiling.
If I translate the diffusers up the Z axis to match the ceiling height, it still won’t be hosted.
If I have a multiple-level building, it throws all the levels’ diffusers onto the origin plane.

How do I fix? I’ve spent 10+ hours on this and have just exhausted my ideas.




5.dyn (72.8 KB)

1 Like

You have to provide the host when placing hosted families so you need to use a node that allows for that. I believe Springs has a node and maybe some other common packages as well.

1 Like

Alternatively, you only use non hosted families, and build new families, which I remember Sean suggesting as preferred anyway (hosting has complications if they move change or are deleted).

There is a sneaky way to do this natively in Revit by setting up an architect model, placing the diffusers you want non hosted, and then link this file to an MEP model and copy/monitor them, and Revit automatically converts them to non-hosted.

1 Like

Hosted Element dose add complexity! Here is a PDF outlining an “out of the box way” for placing hosted element on linked surfaces. It is Electrical Receptacles but the concept is the same.
PLACING ELECTRICAL RECEPTACLES WITH DYNAMO.pdf (928.0 KB)

4 Likes

Thanks for your help @Sean_Fruin , the PDF you sent over worked great… for a 1-level building :grimacing:
I ran it on a one-level building and the air terminals were hosted in the ceiling, moving with the ceiling and facing the right direction (Bonus!). I did have to do some funky mojo on the Geometry.DoesIntersect because I was getting a lot of -1 outputs, but I got there.

When I ran the same code on a two-story building, for some reason, NONE of my points intersected with my ceiling surfaces (all outputs coming out false). I checked the spaces and the ceilings and they’re definitely intersecting in the model and the ceilings are room-bounded. And when I look at the model, sure enough the points are resting on the ceilings.
Any idea what’s going on?

Im assuming it is a list management issue but there are countless issues that can pop up while running on large production models. Identifying edge cases that are responsible for error is honestly the hardest part.
As mentioned earlier hosted elements adds complexity. I would try to simplify the process by run the script on one or couple of spaces to help identify where and why issues occurred.
“If it was easy it would just be the way!”

1 Like

Agreed. I think running many spaces at the same time on different levels may just be too much to handle.
I was just talking with my design team and we’re looking at creating a user interface to select specific spaces to run the code on. I’m also looking to set it up so that the engineers can select how many diffusers they estimate for a given space and which diffuser they want.
I’ll let you know how that all goes. Thanks for the input.

2 Likes

Ok, I’ve struggled over this for a while now. The last bit that I can’t seem to figure out is this: I can’t get Dynamo to recognize the ceilings from a linked document in the node FamilyInstance.ByFace.


This is the last step to get it to work and I’m not sure what to do from here. But I know my brain has spent too much time on it already.Diffuser UI SIMPLIFIED 1.dyn (201.6 KB)

1 Like

Hi,

I don’t think the OOTB FamilyInstance.ByFace node will ever work with a linked element.
You could actually create an ImportInstance in your project but I find that silly.
Fortunately, the FamilyInstance ByReference node of the Genius Loci package works perfectly with linked elements and provides an alternative solution.

2 Likes

Thanks, @Alban_de_Chasteigner , that node looks like it’s actually functional! However, I’m still getting an error:
image

I’m thinking it’s because upstream from here, I’m having a hard time grabbing all the linked ceilings:

It says that it’s getting all the ceilings downstream (I did that Object.Type node just to make sure) but I think the first error in the Genius Loci node might be a result of this node’s problems. Any ideas how ot solve this?
Feel like I’m sooooooo close!

Hi,

SteamNodes package hadn’t been updated for a long time. Use instead the SelectByCateOrType node.
The input reference needs a Autodesk.DB.Reference. You just need to convert the linked surface into a reference and you’re done.

You’re right, that node works great.
I’m still getting the error at the FamilyInstance ByReference node at the end. It’s still not placing the diffusers that I need at those points, even when I feed the ceilings directly into the node. It looks like it’s expecting an XYZ point to reference, but I’m worried that it I throw in an XYZ point, it won’t actually be hosted to the linked ceiling.

It is difficult to help you without seeing the graph. You need a point (XYZ), a reference (of Surface) and a direction (Vector) to place each diffuser.
The necessary steps :

@Alban_de_Chasteigner , sorry about that. Here’s the code, and I know it can probably be simpler
Diffuser UI SIMPLIFIED 2.dyn (178.5 KB)
Still getting that error at the end…

@Alban_de_Chasteigner , I managed to get this far but Dynamo still will not put the two families on my hosted ceiling. I uploaded my code in my last message, but FamilyInstance ByReference is still giving me the same error. Any ideas?

I have already answered previously but either I do not express myself clearly or you did not read my messages carefully or look at the image that I took the trouble to make.
Surfaces must be converted to Autodesk.DB.Reference in order to use the FamilyInstance ByReference node.

My apologies if I made you upset, I read the messages and looked at the images you were kind enough to provide. I guess I just did not understand or thought I had done what you suggested. I apologize again for the inconvenience and will try to figure it out. Thank you.

Returning once again with a solution!
@JustinStirling found a discussion found here which clued us into a BimorphNodes node called LinkElement.OfCategory , which seemed to appropriately pick up on the architectural link’s ceilings, and allowed us to host our diffusers to the ceiling! We tested it out a couple times and were successful: if the ceiling moves in the arch model, it moves in our model!
So I created a quick user interface for our engineers to be able to determine which Supply and Return diffusers to use. The code then takes these diffusers and places one of each in the middle of the room, hosted to the ceiling.
My next step will be to work with the awesome Sparrow package to align it to the ceiling grid (if there is one).

Thank you all that helped get us to this point!
Diffuser UI SIMPLIFIED 4.dyn (159.6 KB)

2 Likes

Nice work @jmayesP84R8, and thanks to everyone else who contributed! @Sean_Fruin, @Alban_de_Chasteigner, @Thomas_Mahon

1 Like