List.Map to Create Points on List of Surfaces

I’m trying to create a script that will generate a rectangular grid of points within a Revit Family Type that is a rectangle of model lines. Then, place a component on each of the points created. I have achieved this for a single instance of the family type but I want the script to generate the points for all instances of the family type. I thought list.map would be the way to run the function through the list but I cannot get it working properly. I removed the custom families and revised the code to use surfaces so someone else can run the code. Any suggestions are appreciated. Thanks.

Dynmamo File: Seating-Areas_Loop-Node_TEST.dyn (32.2 KB)

Based on the thread below I learned list.map only allows for one function (node) to be executed on a list. Below are screen shots of an offset working though a list.map, but not an offset and rotate. I’m going to look into a design script solution. Perhaps I can write all this as a function and execute the function on a list.

http://dynamobim.org/forums/topic/loop-more-than-one-function-through-a-list/

You could accomplish what you want using a custom node and connect this to the f(x), with the input being “surface”

If you require multiple input the “List.Combine” node can be used in the same manér as “List.Map”.

1 Like

Thanks Jonathan. I’ll give that a try and post my results.

It worked! I read through the Dynamo Primer on custom nodes. Then took the set of nodes I created to be the function and created a custom node from it. I then added the inputs and outputs to the custom node and viola, points on a list of surfaces that are relative to each surface’s geometry.

Thanks Jonathan!

2 Likes

You’re very welcome, if a comment solved your problem mark it as the solution and maybe leave a like here and there :slight_smile:

Done and done. I’ll post the final script that shows how I’m using this to populate arrays of tables/chairs or benches on multiple areas on a site plan. My firm is working on a series of shipping container parks where this will help expedite the site design.

1 Like

Here is my working version. it populates picnic bench or table/chair seating families within a simple rectangle family based on the family type. This is my first go at Dynamo and visual programming. It’s a little different than AutoCAD scripting. Thanks to all in the forum for your help, either directly or through your postings.