Read family file name in excel and apply parameter to this family

Hello, I’m a new dynamo user and have a problem I cannot solve:

I have a great number (more than 100) of family files on révit and I would like to write parameters value on each family file using an excel database.
For my test, my excel contains 3 columns, 1/ rfa file data name “test.rfa”, 2/ the first parameter and 3/ the second parameter. There are as many rows as the number of rfa files that all are in a same folder.

I made a dynamo that is able to read the rfa file name in my excel (1st column), to open it. Then I succeed in writing the parameter value in the rfa file. HOWEVER my dynamo always write the first row on each family ( it applies the parameters of the first row to every rfa files);;
I don’t know how to do to say to dynamo “apply the parameter value that is on the same row that the rfa file you are writing on”.

I hope I have been clear

If someone can help it would be very nice.

Thanks

Can you include some screenshots of what you’re doing and where it goes wrong. :slight_smile:

1 Like

Try either flattening your document input or use list levels. (right before your setparameterbyname node)

OK thank you for your help. It’s nice

I tried flattening just before the SetParameter node but nothing changed. Maybe because I don’t know w how to set the “amt” factor on List.Flatten node.

You need to get the structure of your lists to match :slight_smile: Try and see this example:

Thank you Jonhatan for answering,

Unfortunately your solution does not work and eve if the list is flattened, each .rfa that is opened get the first value of the excel. I should find another way to do what I want .

Can you show your attempt?

Alternatively share your .dyn, .rfa and .rvt files and helping you is much easier :slight_smile:

I cannot upload .dyn or .rfa, the website does not allow it to me

Then add a Dropbox, drive or other file share link… Including your revit file

Here are the files

https://we.tl/7dXmds1fyq

First you must create shared parameters (PLOUK end SGIG) to the family (or apply the .dyn add_shared_param that do it directly).

Thank you for your attention Johnatan

Hi @j.bollon

I had a look, how does this look to you, the only change I made was to change the lacing from “auto” to longest on the two “FamilyDocument.SetParameterByName” nodes as seen here:
image

Your solution works perfectly.
I still wonder why (i never changed this parameter on the nodes before) but It is fine.
Thank you

Regards

The possibility of using the lacing is simply the way that the nodes handle lists :slight_smile: I’ll recommend that you play around with some simple list structures and experiment with the different types of lacing :slight_smile:

I have a same requirement. I need to create the parameters in family based on Excel. Can you please share your script to me. prasath.be.mep@gmail.com

Can you please share your scripts with me? Thank you
waqarkhan9494@gmail.com

Please share these scripts :slight_smile: