# Values from excel into revit change

**URL:** <https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418>\
**Category:** Revit\
**Tags:** revit, excel, dynamo\
**Created:** [January 23, 2018, 7:21am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418 "2018-01-23T07:21:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 7:21am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/1 "2018-01-23T07:21:06Z")

</div>

I created a program to put values from excel into Revit. This all works fine for lengths but when it comes to mechanical flow and thermal conductivity the values actually change.  
14 changes to 396.44 L/s and 15 changes to 45720 W/(m\*K).  
Why does this happen?  
Is there something going with the specific units of measurement? How would I circument this?  
All values go through the exact same process so the issue doesn’t lie there.

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [January 23, 2018, 7:29am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/2 "2018-01-23T07:29:12Z")

</div>

have you tried to import them as String?

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 7:31am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/3 "2018-01-23T07:31:17Z")

</div>

I have now, but the Element.SetParameterByName node doesn’t accept that as value.

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [January 23, 2018, 7:32am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/4 "2018-01-23T07:32:38Z")

</div>

use **String.ToNumber** node after importing your value, to convert the back to integer

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 7:34am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/5 "2018-01-23T07:34:52Z")

</div>

It functions now as it used to. So still with the wrong value.

I also don’t understand why it would work otherwise.

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [January 23, 2018, 7:36am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/6 "2018-01-23T07:36:46Z")

</div>

can you post screen shot for your script and result ?

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 7:47am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/7 "2018-01-23T07:47:23Z")

</div>

This is what’s in the excel file, you might notice I’ve chosen the values for testing reasons (and that I’m Dutch):  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/2/92c92297435a80a048b5bb1dc897a5be742ec47c.png)  
This is wat eventually goes into the node:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/e/2e0e63bb98d221727b565909e9fb8d332d5d2f6e.png)  
And this is the result (Edit: for Type 1):  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/7/07f096acf29cb560d0162afb3a5334dbae826adc.png)  
I don’t think there’s much of a question where it goes wrong, I am wondering why and how I could circumvent it (hopefully not by just adding an extra calculation to change it back in some way).

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [January 23, 2018, 7:55am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/8 "2018-01-23T07:55:59Z")

</div>

aha , that’s related to parameter type of Waterstrom & Warmtegeleiding and their units

you can do that experimental, let’s dived 396.44/14 = 28.317, so the result from excel must divided by 28.317

also 4.5720/15 = 0.3048, so the result from excel must divided by 0.3048 before set them to parameter

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 8:06am UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/9 "2018-01-23T08:06:20Z")

</div>

Well…

That’s not exactly what I wanted but I guess it’s the way to go.

Thanks for the help anyway.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 23, 2018, 1:34pm UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/10 "2018-01-23T13:34:32Z")

</div>

It is in fact a units issue. I believe that the package MEPover has some solutions for this.

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 1:43pm UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/11 "2018-01-23T13:43:22Z")

</div>

The issue is that it’s only a number that now, for the sake of ease, every single value of all the different parameters go into the same Element.setparameter node. So I can’t easily make exceptions, nor do I want to, I can still change the value within Revit itself rather easily.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 23, 2018, 1:55pm UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/12 "2018-01-23T13:55:48Z")

</div>

I don’t believe it’s an exception, I think you need to convert the units before you set the parameter. I’ll see if I can find time to build a graph illustrating what I mean but I’m a bit over my head building in these units. Can you send a stripped down file I can test on?

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 23, 2018, 2:03pm UTC](https://forum.dynamobim.com/t/values-from-excel-into-revit-change/18418/13 "2018-01-23T14:03:36Z")

</div>

I do understand you.

But I’m fine converting it Revit. I don’t want to send units into revit, as it concerns dimension values I’m sending in values for lengths as well as integers determining what kind of shape should be used in certain positions and the amount of pipes in the family.

I do very much respect your will to help but it’s not necessary.
