Wall Hosted Receptacles (Continued)

The responses to an earlier post by Damon Sidel started to drift away from the task at hand so I wanted to clean up what he and I were working on

Damon had written a script for dividing up walls every so often for placing receptacles. I added to his baseline work to elevate these receptacle placements to 18"AFF.

Our joint efforts are doing what we want so far. I can place reference points every six feet along a wall, place a receptacle at that point and elevate it to 18"AFF, but the receptacle family is placing horizontal instead of vertical.

It seems as though they are hosting to the floor and not the walls. Any ideas on how to rotate these 90-degrees from where they are currently sitting?

Please refer to the images below


We would need to see your family, but my guess is that the family in question is hosted to a plane, and as such you need to define a plane that is equal to the face of the wall you want to host them to.

Also it appears that you’re placing one outlets twice - once on the floor and once 18" higher - my guess is you want to move the point vertically by 18" prior to placing the family on the floor and then again in the air.

Also also you may want to set the offset of the wall to 1/2 the thickness so they place without having to adjust the thickness every time you change wall types.

The duplication is another issue. The orange group is duplicating the family placement, I need to do some housekeeping and have the shift happen BEFORE the family placement.

The Revit Family is an out-of-the-box receptacle which is FACE BASED.

Where was your other post?

To solve this you need to define points on the face of the wall, not just a point in space. Imagine what would happen with a curved wall or an edited profile with how your script is running now. Each of those points would have a different normal so each would have a different rotation.

I’m not at my PC, but my gut says to try getting the inside or outside face of the wall (you’re offsetting + numbers and I think that is typically outside so start there) and defining UV points on it instead of using points along an offset line in space.

Here is Damon’s original post - Place wall hosted object (electrical receptacle)

Ok. I get the idea now. Try a modification of the workflow below to get the room facing wall surfaces, then define your UV points, and finally get place the outlets on the planes at those points.

I will give that a shot, in the meantime I have corrected the duplication.

The saga continues…

My guess is that the lunchbox wall element collector node doesn’t work with the link but I haven’t cracked open the file to check. Filter the list of walls by their parent family after using the Element.GetFromLinkedFile node.

I’m new to Dynamo and I have been working on this for a couple of weeks. I can host 1 receptacle per wall (midpoint) in a host model. When I take that same script to a linked (MEP) model (modified to grab LinkElement.Faces), I can grab all the faces but the node for placing the family fails. If I use the select linked faces node to grab 1 face at a time, it works.
Since I’m a new user I cannot upload my scripts. So I’ll try to explain some more.
Workflow is;

  1. Grab all linked wall surface.
  2. Filter by vertical orientaion.
  3. Filter by surface area greater than 50. (removes door cutouts)
  4. Surface point at parameter to get midpoint of wall.
  5. Vector by coordinates to get normal vector to wall face.
  6. Input family type, face, location, and vector into FamilyInstance.ByFace

However, what I REALLY want to do is host a one receptacle to every wall in a room. The problem I’m having even in a host model is my surfaces keep duplicating. I’ll get my midpoints from roomboundary curves and try intersecting them to a wall surface. Seems simple enough but it keeps giving me multiple instances of wall surfaces at the same spot instead of at every intersection.

The only duplication that I ran into in the past was that my section planes would place a receptacle at 18" and also place another one on the floor slab. Sounds like you figured out the wall face selection, I didn’t get that far and my receptacles would insert facing up instead of flush on the wall surface. Lots of images in my previous threads.

I will give your workflow a try


See that dark black string of points in the middle of the model? It’s getting multiple surfaces but it’s like they are all the same ones (when I’m trying to intersect points).

If, in a host model, I go by point at parameter, it works like a charm (although only one point per wall).
With your curve divisions by distance, you’ll run into the same thing I did. You need the same wall duplicated for each receptacle that intersects that wall.

THEN the problem arises of transferring this script to get linked faces. Then the node FamilyInstance.ByFace fails. UNLESS you PICK the face for a parameter point receptacle.

Would you be willing to share the .dyn?

Here is mine, still has some bugs

Receptacle Placement.dyn (12.3 KB)

It is using Curve.DivideByDistance node, which doesn’t exist in the latest Lunchbox and is referencing a 1.3 .dll file.What is that node putting out, so I can find its replacement.

I believe that one decides the wall spacing, generates the placement and planes you can see in the screen shots from earlier posts.


Would you be able to share the .dyf and .dll?


I’ve tried using other nodes in Lunchbox without any progress at all.

I don’t know what those file extensions are, my Dynamo script is attached a few posts above

Looks like you are getting package errors, I will back track and label the custom nodes

Yes, the .dyf and .dll are from the particular Lunchbox package you’re using.