Using Dynamo to place multiple instances in a Revit Project

Hi there,
my name is Lorenzo, this is my first post.

I am using Dynamo because I have to place hundreds of elements in my project (lighting fixtures families, for instance) and every one of them has different parameters (Circuit name, Electrical panel name and so on).

With Rhino and Grasshopper I managed to read the DWG files (my input from the designers), my outputs are some TXTs files in which I have all the informations I need: the position of the elements and all the parameters for each of them.

Everything works fine, I import the TXTs in Dynamo and after I hit run I can see the families correctly placed in the project with the parameters I want.

But I can’t go on with my work, because if I insert the next set of TXT files in order to place another family in the project (for example the switches) everything i’ve done with the previous family disappears.
What I would like to do is to bake (like in grasshopper) the Family Instances in the Revit project, interrupting every bond between the instances and Dynamo and then using the same Dynamo doc to go on with all the other families. Is that possible?

I am using the “Place FamilyInstance by point and level” node to place them.

Thanks in advance to everybody!!

Could you post the DYN and or some screen captures? It will only help with your question

Thanks for your quick response!

this is a picture from the project:

and this is a picture of the Dynamo definition:

The code works with no errors.
My doubt is about the workflow, probably I am missing something here. The objects you see in the previous picture are real revit family instances, I can even schedule them! but when I try to generate the next set of object they all disappear, as if they were still linked to the dynamo definition that created them (they surely are).

I just want to tell Dynamo: “OK, those family instances are just fine! let’s move on and create more without deleting them!”

Thanks again to everybody, have a nice sunday!

Dynamo doesn’t have the option to bake your created families. What you could try is closing the dynamo file after the first run and then opening it again to start the next run. Whether this is a viable option depends on the total numbers of runs you need do of course. If this isn’t a real option then you’ll probably need to try and get your dynamo file to do all the runs in a single run with some kind of looping construct.
If you can show some more of your file and the inputs for it then we might be able to help some more with the latter option.

1 Like

Thank you T_Pover,
unfortunately I have already tried that solution and it doesn’t work. I even tried to close Revit! when I open I see the elements I’ve placed but when I start dynamo and hit run they are still affected by the code that replaces them with the new set.

I have even tried to group the elements i’ve created and then launch the new run, but something wierd happens: some of the elements of the group become invisible (but if i select the group they re-appear) and when i ungroup them they are gone.
and obviously none of the element regarding the new run are created.

regarding the “single run” process I think it would be pretty difficult for revit to handle as it should place more than 5000 instances probably.

I think I’m going to work on a separate project, linking it to the main project and binding the link for every set of items.

I will upload the Dynamo definition later, but all the parts not showed in the picture are really just for data import and management. The code itself is very simple.

Thanks again.

That is weird, haven’t experienced that before.
If you know for sure that your workflow will work for the 5000 elements then I would just give it a go… let the computer whirl for a few hours. I’ve got a few scripts that take a few hours, I just leave them on overnight and in the morning my work is done :slight_smile:

Just sharing some info I posted earlier, that may help, it is about controlling families from Excel (your outputs are txt which can be converted easily to Excel). This process allows bi-directional processing centred around the excel file. See earlier post Control Revit family via excel

I have attached some sample files, but as yet I haven’t looked into controlling hosted families and the lights in the samples are hosted families, so there is some discrepancies on the levels when extracting the family information to and from Excel. But you should get the gist of how it works.

The lesson I learnt here, was rather than trying to “Bake” families, was to handle them on separate sheets within the spreadsheet. This allows quantified processing of discrete elements. This is handled by the input “sheetName” on “Excel.ReadFromFile” and “Excel.WriteToFile”.

Of course I’m open to suggestions that improve this process.
Lights.xlsx (10.3 KB)
EXCEL-2LIGHTS.dyn (86.8 KB)
LIGHTS-2EXCEL.dyn (43.8 KB)
LIGHTS.rvt (1.4 MB)

That sounds great!
Now I’ve extablished a workflow working in another project and doint the “Link & Bind” thing for every set of items, but I will look for it as soon as I can!

@T_Pover unfortunately I have to do some checks periodically on the placed objects, the information extraction from the DWG annotation is not perfect. for this reason I need to go step by step,

thank you all for your support.

Hello Lorenzo! How did you get around this problem?

You mention Link and Bind? is that a node? cause I ve come up on the same issue.

Regards,

John

Hello,
“link & bind” is the way I call the workflow I am using. I started to place the elements the week after I opened this topic and I have already placed thousands of them.

As described before, I use a parallel revit model in which I have the architectural rvt filed as a link. I place the elements level by level, one family type at a time, I adjust the position and the parameters if necessary and finally I link this rvt in the project I’m working on and I bind the link, importing the families I have placed in the parallel model.
I have repeated this operations several times by now, and I have to say that if you have to place tens or hundreds of elements for each type in each floor it is pretty convenient.

Anyway it is pretty slow compared to the grasshopper bake function, thanks to which i could avoid all the “link & bind” thing…

1 Like

THnaks for getting back to me Lorenzo.

Clarify one thing: Are you changing a parameter in the instances after you place them and that allows you to create the new families in your next run?

If for example I change a parameter for all of them say comment it would work?

will try more tomorrow.

Thank you again

John

I know this thread is a bit old and I’m late to the party, but I’m wondering if you were to create a new Dynamo graph for each family (or however your TXT files are grouped) so the duplicate graph has no connection to your Revit project would you have the same issue (i.e. a light fixtures family placement graph to place the light fixtures then a separate switches family placement graph to place all of the switches)? This might be a little easier for a workaround than linking and binding. I haven’t tested it at all, but I would think if the dynamo files are completely independent of each other then they shouldn’t share the link created between the Revit file and the individual Dynamo file.

@i.tzivanidis
Sincerely I can’t remember if I tried this, it might work!

good luck with your test!

@Brandon_Schafer
That might be a really good idea. I am afraid of what could happen when I have to use a dyn file for the second time. I wonder if Revit remembers the association.
Unfortunately I have several floors and several element types for each category. It’s a big building :slight_smile:

Thank you anyway for your suggestion, I’ll give it a try asap!

I realize I’m way late to the game, but I just had a similar problem and came across this thread


Apparently, binding a Dynamo node to the families it creates is “by design”.