Automatic face-based electrical fixture/receptacle placement on a wall

Good afternoon all,

I wanted to share a problem I encountered while trying to automatically place receptacles on a wall. The script came from this gentlemen’s tutorial ( Outlet Placement using Dynamo! - YouTube) so all the credit must go to him as I was not the one that created this script. He does an incredible job of teaching this script and how it works.

He gives an important disclaimer at the beginning of his tutorial in that horizontal, face-based families will not work, which is the exact family I need to use lol. I have the script created and have now come to the troublesome part where my face-based family will only be placed on the floor… Not on the wall at the specified height… I really enjoy the part of this script where we can associate the points along the wall with vectors… As you may be able to tell in the script, my vectors are horizontal thus placing my fixture on the floor… instead of the offset defined by me on the point on the wall…

Does anyone have any thoughts on how I can get my fixtures on the wall? I can share the dyn. file if that is helpful so please let me know.

Thanks!

Luke

If you’re placing a face-based family you need to use FamilyInstance.ByFace. Placing face-based families is much more complicated than placing unhosted families, but it can be done. Search through the forum for examples. This is not an uncommon issue.

1 Like

Man, that is a cool node. Thanks @Nick_Boyts for the suggestion.

My walls in my model are from the linked architecture file. I think I understand the “location” and “referenceDirection” inputs of this node. The “face” input of this node now has me asking questions like “How do I get the surface geometry from the walls (that are linked) in my room” and “how to select the face of a wall in a linked Revit model”. I’m seeing some similar posts on this forum about this subject but I am struggling to find the answers to what I am looking for. Do you have any thoughts or advice on how I can either get surface geometry from the linked wall or how I could select the wall face? Heck, am I even asking the right question now?

Thanks Nick,

image

This is the “much more complicated” part. You will probably need a combination of ootb and custom nodes to get the linked wall elements and their surfaces (faces). From there you’ll need to setup some logic for selecting the proper face.

You may refer to the sample code in Revit API documentation under NewFamilyInstance Method (Face, XYZ, XYZ, FamilySymbol) for some ideas. The link to the sample code is as below:

https://www.revitapidocs.com/2016/3afcdf82-b25c-3092-d42c-b60490075d22.htm

I have also developed the dynamo script based on this sample code, you may download it from the below link. Hope that you can give some ideas to solve your problem.

CreateLightFixtureOnWall.dyn (55.3 KB)

@lfaussK8Q8Y

I am also struggling with same problem. have you got any solution to it?