# Get paramter value by number not string

**URL:** <https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333>\
**Category:** Revit\
**Created:** [March 14, 2017, 6:46pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333 "2017-03-14T18:46:05Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 14, 2017, 6:46pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/1 "2017-03-14T18:46:05Z")

</div>

Hi, I am trying to do a rough system sizing using dynamo, but I cant seem to get the size of the pipes as a number rather than a string so that I can actually use it. So I tried to just think about selecting the maximum sized pipe but even then its not working. If I sort the list I thinks 8" is the maximum. but there are infact 10" and 14" pipes in there. How do i convert these pipe sizes to numbers? Thanks

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 14, 2017, 6:55pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/2 "2017-03-14T18:55:00Z")

</div>

Hi @mix

Before we answer your questions. Could you please reply to your previous posts mark the posts as solved if it has solved. It helps us keep the forum tidy. Thanks!

> [@Rename a view parameter using sheet name not working at last node](https://forum.dynamobim.com/t/rename-a-view-parameter-using-sheet-name-not-working-at-last-node/10218/2):
>
> Hi @mix You need to connect elements. Currently your feeding string values. And also could you reply on your previous topic. Mark the post if it is solved.

> [@Get/Set View Scale](https://forum.dynamobim.com/t/get-set-view-scale/10112/8):
>
> @mix Try this dyn file [for mix.dyn](https://forum.dynamobim.com/uploads/short-url/rngA5chLpGeO7xqYLvyktX2djy4.dyn) (4.2 KB) connect your sheet with python.

> [@How to find out which sheet numbers a generic annotation is on?](https://forum.dynamobim.com/t/how-to-find-out-which-sheet-numbers-a-generic-annotation-is-on/10318/2):
>
> This would be a start

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 14, 2017, 10:05pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/3 "2017-03-14T22:05:05Z")

</div>

all of my question have solutions applied to them. can anyone help me please? thanks in advance!

---

<div class="post-metadata">

**Author:** ![T\_Pover](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/t_pover/32/19147_2.png) [@T\_Pover](https://forum.dynamobim.com/u/T_Pover)\
**Post date:** [March 15, 2017, 8:26am UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/4 "2017-03-15T08:26:05Z")

</div>

You could try getting the parameter “Diameter” instead. That will return a double.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 15, 2017, 9:12am UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/5 "2017-03-15T09:12:50Z")

</div>

@mix Try this:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/6/964b7f70d4e69ba35573c2eaa8df2d9cf4dcbfa6.png)

---

<div class="post-metadata">

**Author:** ![viktor\_kuzev](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/viktor_kuzev/32/48254_2.png) [@viktor\_kuzev](https://forum.dynamobim.com/u/viktor_kuzev)\
**Post date:** [March 15, 2017, 9:36am UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/6 "2017-03-15T09:36:33Z")

</div>

Here is one more approach:

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

It would be slightly different in imperial because the separator would be the " sign.  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/1/f134d1cd22ba8e4ed8b938438174808d244f28e2.png)

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 15, 2017, 6:26pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/7 "2017-03-15T18:26:33Z")

</div>

@viktor_kuzev  
Thats an interesting way to go about it. But is there a way to do that using English units easily because, it doesn’t do fractions that way, and IP units have a lot of fractions in our pipe sizes.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/f/9ff06cad328726adb1ac687c4138a9cbf9a29adc.png)

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 15, 2017, 6:39pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/8 "2017-03-15T18:39:19Z")

</div>

@Kulkul,  
Im not getting the same results as you. Have you tried having pipes larger that one digit? Here is what I get when I do it your way:

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 15, 2017, 7:39pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/9 "2017-03-15T19:39:52Z")

</div>

@mix This should would work.

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

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 16, 2017, 1:28pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/10 "2017-03-16T13:28:07Z")

</div>

I am not getting mine to work like yours. I am not sure what that lunch box node is supposed to do, but in mine it is pulling in a number, and I think that might be what is messing it up.

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 16, 2017, 3:53pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/11 "2017-03-16T15:53:14Z")

</div>

@mix watch the lacing for “String.Split” node. You can find all the basics from here [http://dynamoprimer.com/en/](http://dynamoprimer.com/en/)

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 16, 2017, 5:06pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/12 "2017-03-16T17:06:08Z")

</div>

Good catch! yeah, Im still bad at remembering lacing. But this sill doesnt seem to work for me, I am getting null values…? and the max size pipe is 14" not 5"

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/1/f1a86c456aed187fd17bf1aa8a74be843472e3e3.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 16, 2017, 5:14pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/13 "2017-03-16T17:14:36Z")

</div>

@mix It gives you maximum item in a list. As per your query you need maximum in a list. Look below it shows clearly your looking for maximum item in a list and now your getting it. For other null values questions you should start a new topic.

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

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 16, 2017, 5:26pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/14 "2017-03-16T17:26:24Z")

</div>

i am not getting the maximum in the list though. i only mention the null values because I thought they might be throwing off the maximum output. Right now it is not converting my fractional pipe sizes to a number at all so they are being discarded, which I dont want, and the maximum pipe size is actually 6" in this project not 5" like your method suggests it is. Therefore, you graph isnt working to help me find the maximum pipe size. Does that make sense?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c0da625f6a8a3e319bcdd317e98c62ee000ff57a.png)

---

<div class="post-metadata">

**Author:** ![mix](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mix](https://forum.dynamobim.com/u/mix)\
**Post date:** [March 16, 2017, 5:31pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/15 "2017-03-16T17:31:09Z")

</div>

And removing the nulls should still be appart of this post because there is no reason any pipe sizes should be returning a value of null. A pipe size cannot be null in revit. Therefore there is a problem with the graph. I suspect that your method is throwing out fractional pipe sizes and not actually converting them to a number. Instead it is making them “null”. Does that make sense? Therefore for example, if my largest pipe size was 2-1/2" in my project, your graph wouldnt see that value at all, and therefore produce a false maximum. Does that make sense?

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 16, 2017, 6:51pm UTC](https://forum.dynamobim.com/t/get-paramter-value-by-number-not-string/10333/16 "2017-03-16T18:51:11Z")

</div>

@mix Is this what your looking?

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