# Compare excel list to revit list and set value

**URL:** <https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384>\
**Category:** Uncategorized\
**Created:** [September 22, 2020, 8:52am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384 "2020-09-22T08:52:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.d.nielsen](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jacob.d.nielsen](https://forum.dynamobim.com/u/jacob.d.nielsen)\
**Post date:** [September 22, 2020, 8:52am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/1 "2020-09-22T08:52:17Z")

</div>

Hi Everyone, I’m a little stuck.

I have a list of familys that I need to align with a list from Excel.  
How do I get the values from the Excel list to write to the parameter of the real family.  
Example.  
From excell  
0 - R1 = Family Type: R1, Family: Radiator  
1 - 0 = DOM\_Height  
2 - 0 = DOM\_Length  
3 - = DOM\_Width

Yes, I know that Excel is not really filled in according to dimensions, but it is being worked on at the moment.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa5587dea233507c51bdf88739af3223c45ca9a8.png)

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [September 22, 2020, 9:16am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/2 "2020-09-22T09:16:36Z")

</div>

Use the Family Name as Indices in combination with the nodes List.IndexOf and List.GetItemAtIndex to get the correct Revit Family according to your Excel List.

---

<div class="post-metadata">

**Author:** ![jacob.d.nielsen](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jacob.d.nielsen](https://forum.dynamobim.com/u/jacob.d.nielsen)\
**Post date:** [September 22, 2020, 10:19am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/3 "2020-09-22T10:19:40Z")

</div>

Many thanks Daan.  
However, I get -1 all the time  
Maybe you can help?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/6/e68f23e3df37d910b55f7a498ccbaf313f133649.png)

---

<div class="post-metadata">

**Author:** ![Deniz\_Maral](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/deniz_maral/32/80323_2.png) [@Deniz\_Maral](https://forum.dynamobim.com/u/Deniz_Maral)\
**Post date:** [September 22, 2020, 11:22am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/4 "2020-09-22T11:22:47Z")

</div>

You have to get the name of Family Type and then… You are connecting incorrect type. It has to be string.

---

<div class="post-metadata">

**Author:** ![jacob.d.nielsen](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jacob.d.nielsen](https://forum.dynamobim.com/u/jacob.d.nielsen)\
**Post date:** [September 22, 2020, 11:47am UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/5 "2020-09-22T11:47:10Z")

</div>

Okay. But now it finds some who should not be in the list. Example R3 is not in the project

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/4/64bb8e850f6c17f32051c7cf5c1373d076b80e5a.png)

---

<div class="post-metadata">

**Author:** ![Deniz\_Maral](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/deniz_maral/32/80323_2.png) [@Deniz\_Maral](https://forum.dynamobim.com/u/Deniz_Maral)\
**Post date:** [September 22, 2020, 12:40pm UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/6 "2020-09-22T12:40:22Z")

</div>

Your logic is not true. Get first elements from excel (R1, R2…etc.) and find their index in Family.Name node. After that GetElementAtIndex and as list get the list of Family Types and indexes you found.

---

<div class="post-metadata">

**Author:** ![jacob.d.nielsen](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jacob.d.nielsen](https://forum.dynamobim.com/u/jacob.d.nielsen)\
**Post date:** [September 22, 2020, 12:40pm UTC](https://forum.dynamobim.com/t/compare-excel-list-to-revit-list-and-set-value/55384/7 "2020-09-22T12:40:52Z")

</div>

Now it works.  
I found a small bug in the excel sheet. That was it.  
Thank you for all your help

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8b877aba38604046d3fb4ded97e6f0e224fe8948.png)
