How to create a Do While Loop to process Family Parameters in Revit

Thank you to both Jimmy and Einar for your replies.

I assume Jimmy, what you are saying, is what Einar has put forward ?

My original intention was to look at how a “generic” Revit family’s parameters could be manipulated, the cube is immaterial, it could have been some furniture or any other family, I would like to control other parameters of the family, importantly it’s position, but I guess that will be an addition to this exercise.

However I have recreated the code and have attached the files for discussion. It certainly is a more elegant solution ! But it is not without some issues which I guess will require some additional code to fix.

First of all I’ll start with a Revit file that has the same number of placed families, as there are listed in my Code Block ie (4). When I run the code it creates an additional family on the original pt.

Secondly when I run the code again it comes up with some sort of reversal of the list which at this stage makes no sense. When I re-run the code again, it switches back to the set out dimensions.

So it kind of works, I assume if you wanted to process 400 families rather than 4, you would have a link to a list such as a list in excel, I haven’t looked at interfacing a list from excel at this point.

The version of Dynamo I’m using is 1.1.0.2094

New Dynamo Code, CUBE6D.dyn (86.9 KB)

Revit File, Cube6D.rvt (1.2 MB)

Additional family added at origin point.

Results from running the Dynamo code on alternate Occasions ;