Loop for family parameters

Hi everyone,

My name is Dennis.
First of all, excuse me for my english (I’m Dutch). I hope I can make you understand my problem.
I’ve created a Dynamo program that reads data from an Excel file and sets some Family Parameters.
After setting these parameters the Revit project file is saved (Save as). So far so good.

My excel file has a number of sheets. Each sheet contains data. After sending the data from one sheet, the Revit project is saved and the program needs to go to the next sheet. What I need is some kind of loop.
I did try some things (for next loops with Pythonscript and LoopWhile node) but I can’t get this thing to work.

Id tried to post my Dynamo project here to show you, but since I’m a new user I can’t do that ?

Hi @d.kelfkens,

Can you post images?

Cheers,
Dan

Thanks for your reply Dan !
I hope you can help me with this.
Cheers,
Dennis

Hi @d.kelfkens,

Is there any particular reason you are trying to step through your excel sheets? You can just set all the parameters at once like i have shown below. Then test if the ouputs are null, if all outputs have returned false then the file will save.

Cheers,
Dan

Hi @Daniel_Woodcock1,

Thanks for your reply !

At first I did set all parameters at once. But when I tried to add a loop in my program things went wrong.
I started with a PDF print and not a save command. The PDF’s printed missed all kind of things. Parameters weren’t set properly (It looked like Revit first needed to regenerate before printing and I didn’t get that to work). After that I changed the PDF print in a save command and I added the steps to make sure every parameter was set before saving.

The questions remains how do I add a loop in the program ?
I’ve managed to create some code that determines the number of sheets in the excel file.
The only thing left is to create a proper loop to set the parameters per sheet and save the file.
So if my excel file has 3 sheets, there need to be 3 *.rvt files saved.