Batch Open Files - Set Nested Families Material Parameter - Save and Close


I’m having trouble with a graph that Batch opens a folder of Families, selects the Nested Families (In this case Bricks), sets the Material Parameter, then saves and closes. - The graph works when I pass in a single file, however, when I pass in the directory contents it appears to open and save and close the files, but does not change the nested family’s material parameters. - Any idea what I’m missing here?

I seem to remember an issue with batch contexts of revit families in the same revit instance. But, I may be imagining this.

tracked this down a little bit. Also if you look on the rhythm repo, @john_pierson has tracked this and is in the readme under known issues.

You might consider the looking at the DynamoAutomation package to run outside of the Revit context to better address that problem…well maybe…

@Chuck.Ross 2 ideas:

  1. Check the level of the node where you are feeding in a list of families, it might need to be set to Level 2
  2. You might need to use a start and end.transaction nodes somewhere in your script to allow it to process all of the parameters you are trying to set before you try to close the file

@kraftwerk15 ,

Thank you for the reply. - I have been getting errors/crashes when adjusting the levels of inputs, I’ll try submitting to GitHub. - I’ll also look into your suggestion of using DynamoAutomation as I have see that mentioned in other posts. might be just the ticket.



Thank you for the reply. - I have tried various combinations of adjusting the levels for the node where I am SetParameterByName for both the inputs for elements (where I am feeding in families) and value (where I am feeding in the material element value) per your suggestion and what I have seen similar examples, including setting the input where the families are being fed into Level 2. - All combinations seem to cause errors, which I intend to submit to GitHub if I don’t find some other clever solution - Nothing (material of the nested brick families) is updated in the resulting families.

Still perplexed,


After some tinkering, I did get the script to work. - The trick was in the list levels when being applied to multiple files. - Interestingly all of the List level manipulation needed to be done in the part of the script where I was getting the Desired Materials “Element” Value.


1 Like