Place wall hosted object (electrical receptacle)

Just trying to quickly automate a relatively straightforward task as a way to get more familiar with Dynamo. I’d like to place electrical receptacles along the walls of a room to follow code (every 8 feet on walls longer than 2 feet, etc.).

I don’t use Dynamo much (I’m a long-time Revit user and like to script and use Grasshopper for Rhino), so just discovered the Springs node package. So with LunchBox I quickly got the walls, divided the wall location curves by distance, and placed the OOTB Standard Duplex Receptacle with Springs.HostedInstance.ByPoints.

First problem, the OOTB receptacle is surface hosted, not wall hosted, so it hosted to the underside of the wall. Made a new receptacle family that is wall hosted, which helped a bit, but some are placed at the point along the curve on the wall, some are not (and are even not on a wall at all!).

Second problem, they are hosted on the exterior face of the wall, so I need to figure out a way to specify interior or exterior (preferably referencing a room to determine, not the wall orientation, but that is for later).

I’m using this as a way to get my feet wet, so I’d appreciate help in the spirit of teaching/learning, not just a solution. Thanks!

Hello Damon,

I think the problem here is the nested lists, can you make it work with only one wall? If that is the case you have at least two options:

  1. Rewrite the python script in HostedInstance.ByPoints to accept nested lists.
  2. Wrap the graph that works for one wall in a custom node, and feed it several walls.

The location curve of the wall is the centerline curve at Base Level. If you want to place your family instance at a higher elevation you will have to translate the line or your points.

If you want to place a family instance at a face you can use the other node i Spring Nodes “FamilyInstance.ByFacePoints”. Here is one way to get the wall surfaces facing a room:

Thank you for your response. I’ll give these solutions a try!

(I have to admit, coming from Grasshopper for Rhino, I’m finding working with Dynamo very difficult… probably because I’m predisposed to think in a Grasshopper-y way and because of just general unfamiliarity.)

Damon,

How is this receptacle placement script coming along? It is on my to-do list as well
I inserted an elevation change to your script, but it needs to get moved so it places only one receptacle at the higher elevation. The receptacle placement comes in facing up instead of out. Another hurdle for me to figure out

Thanks.

Hi, Bill.

So happy to have a co-conspirator to work on my script! No, I have not made any more progress beyond what I posted. I spent a few minutes struggling with Einar_Raknes’s suggestions. I’m not up to rewriting the Python script and I’m too green with Dynamo to understand how to “wrap the graph… in a custom node”. I tried a few things, but with no success.

Part of my problem is that I keep thinking how to translate how I’d do this in Grasshopper to how to make it work in Dynamo. I doubt that that is the most productive though process.

If I make it any further, I’ll post again. I hope you’ll do the same!

Best,
Damon

I know that this is almost a year old but i’m also trying to do something similar and wondering if this has been figured out and if so how did you get it to work. Also, I’m a newbie to Dynamo so I don’t have a ton of knowledge on how to create in Dynamo.

Hi, Austin. I certainly never figured it out. Anybody else out there have a great way to automate placing wall-hosted objects around the perimeter of a room?

Thanks

where did you guys find the Lunchbox?

On the top ribbon you will see a tab for "Packages"
Drop down list says "Search for packages"
Enter “Lunchbox” in the search ribbon and it will come up, should be the first one

thanks

How could we design this so that it reads the rooms and then does all of the calculations that are used for that room?

Guys, The follow up questions should start a new thread. Now we have many questions and many answers. You could link the similar topic if the topic is similar to your query. Please ask OP’s to start a new thread. Thanks :slight_smile:

Has anyone looked into what Damon and I are working on up top?
Trying to place wall-hosted objects at specific locations.

See what’s in this thread maybe: