# Get parameters data types

**URL:** <https://forum.dynamobim.com/t/get-parameters-data-types/56590>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [October 26, 2020, 12:24pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590 "2020-10-26T12:24:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolo.pozzoli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@paolo.pozzoli](https://forum.dynamobim.com/u/paolo.pozzoli)\
**Post date:** [October 26, 2020, 12:24pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/1 "2020-10-26T12:24:53Z")

</div>

Hi,  
is there a way to get the data type (i.e. integer, float, string/text, etc) of a given parameter either of system or component family?  
I’m trying to export data to sqlite and i need to prepare the string data to add single quotes.  
I managed to do so in python with the repr() function but I need to tell manually which parameters are to be converted in strings.  
I wonder if there is a way to get the data types expected in revit for each parameter to use it as a comparison list to get indices.  
If that’s not possible then I thought to loop through the parameter values of my list and check in python with various built in functions (i.e. isinstance(x, str) etc).

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [October 26, 2020, 1:24pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/2 "2020-10-26T13:24:41Z")

</div>

Hi @paolo.pozzoli,

You can use the _Element Parameters Properties_ node to retrieve the storage type.

 ![Element Parameters Properties](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/1/912c9171cc7b4bfcfd55030933d302f68a9a5361.png)

---

<div class="post-metadata">

**Author:** ![paolo.pozzoli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@paolo.pozzoli](https://forum.dynamobim.com/u/paolo.pozzoli)\
**Post date:** [October 26, 2020, 1:58pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/3 "2020-10-26T13:58:31Z")

</div>

Hi @Alban_de_Chasteigner,  
fantastic!  
Thanks a lot for the hint and for this wonderful node you created!

---

<div class="post-metadata">

**Author:** ![paolo.pozzoli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@paolo.pozzoli](https://forum.dynamobim.com/u/paolo.pozzoli)\
**Post date:** [October 27, 2020, 4:16pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/4 "2020-10-27T16:16:41Z")

</div>

Hi @Alban_de_Chasteigner,  
I come back to you as I tried to use your node Element Parameters Parameter but I’m not sure about how to ensure matching Name VS StorageType.  
I’m a beginner in Dynamo so my understanding of sorting lists may be poor.  
I tried to sort the parameter names alphabetically and now I’m trying to match the StorageType in the same order. If I performed the sorting correctly (so showing the real connection parameter-storagetype) I’m puzzled that for instance for BaseFinish parameter Revit is storing the data as double…  
Please see the image below and attached graph.  
Thanks again for your help.  
[GetParamNamesNDataTypes\_RoomsCategory.dyn](https://forum.dynamobim.com/uploads/short-url/wYO4Fs2oqNrASW6RQLTrypUoU6d.dyn) (23.9 KB)

 ![GetParamNamesNDataTypes_RoomsCategory_2020-10-27_05-10-03](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/8/581b90e584676e521f93cbfc76f1222b5df6b477.png)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [October 27, 2020, 4:44pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/5 "2020-10-27T16:44:14Z")

</div>

Hi,

The easiest way is to use a dictionary.  
I don’t know why the OOTB dictionary nodes are failing.

 ![GetParamNamesNDataTypes_RoomsCategory V2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/f/0fdc34e103f32534ae0c0b0858fb2dbc4fe73e49.png)  
[GetParamNamesNDataTypes\_RoomsCategory V2.dyn](https://forum.dynamobim.com/uploads/short-url/xa5IxkGRk7tOOqnqmlb86vphchK.dyn) (18.5 KB)

---

<div class="post-metadata">

**Author:** ![paolo.pozzoli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@paolo.pozzoli](https://forum.dynamobim.com/u/paolo.pozzoli)\
**Post date:** [October 27, 2020, 4:57pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/6 "2020-10-27T16:57:26Z")

</div>

Hi @Alban_de_Chasteigner, you were so fast!  
It works a charm, thanks a lot!

---

<div class="post-metadata">

**Author:** ![thongle3103](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@thongle3103](https://forum.dynamobim.com/u/thongle3103)\
**Post date:** [November 5, 2020, 6:18am UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/7 "2020-11-05T06:18:12Z")

</div>

In case you don’t have genius loci package installed (like me), we can do a more simple way:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fb61b62a4450b27dea5ac5d8bfd862ddf58edef6.png)  
Hope this would help 😘

---

<div class="post-metadata">

**Author:** ![paolo.pozzoli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@paolo.pozzoli](https://forum.dynamobim.com/u/paolo.pozzoli)\
**Post date:** [November 5, 2020, 10:07am UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/8 "2020-11-05T10:07:15Z")

</div>

Thank you @thongle3103! Nice to know  
Bye

---

<div class="post-metadata">

**Author:** ![Congzheng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@Congzheng](https://forum.dynamobim.com/u/Congzheng)\
**Post date:** [January 14, 2021, 11:46am UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/9 "2021-01-14T11:46:34Z")

</div>

Is there a way to get the data of the family type ? I’ve tried two different ways, but failed.  
It works with the wall, but not window, handrail.

@Alban_de_Chasteigner @thongle3103

![Dynamo_GetDataType04a](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/6/164d141ecae320d3763096a7da2aaba3310d7300.jpeg)

 ![Dynamo_GetDataType04](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/ef604c2e6000171d9e2546287c4d359332a13516.jpeg)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 14, 2021, 1:19pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/10 "2021-01-14T13:19:04Z")

</div>

Hi Congzheng,

It’s easy to retrieve the types of the system families with _Element.ElementType_, _Family_ or _Family and Type_ parameters.

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

However, it is not possible to find the Family(element) for system families. But it is possible to retrieve the name of the base family with the _Element GetLoadableFamily_ node.

---

<div class="post-metadata">

**Author:** ![Congzheng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@Congzheng](https://forum.dynamobim.com/u/Congzheng)\
**Post date:** [January 14, 2021, 2:11pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/11 "2021-01-14T14:11:52Z")

</div>

That’s very magic. Thanks a lot.

“Type” for floor category is working

 ![Dynamo_x.Parameters_01](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/e/ce6d022580f83d34eb79b3a0bef38ba2e6d4cb60.jpeg)

“Type” for window category is somehow working

 ![Dynamo_x.Parameters_02](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fbb6db6b35ba1648b5aae32ec269d01842518f4d.jpeg)

“Type” for handrail category was not working, but with “e.Name” block, it works very well.

 ![Dynamo_x.Parameters_03](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/a/3a45afd417b899face73542b963548036301c0e5.jpeg) ![Dynamo_x.Parameters_05](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/7/67cc2ca19a1b70e48a27fb3b92e3162b46eac35c.jpeg)

How to understand the principle of revit logic? when we use “e.Name” block, how can it knows we are looking for the “Type” name, instead of other names?

---

<div class="post-metadata">

**Author:** ![thongle3103](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@thongle3103](https://forum.dynamobim.com/u/thongle3103)\
**Post date:** [January 16, 2021, 5:37pm UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/12 "2021-01-16T17:37:03Z")

</div>

Hi @Congzheng

We use code block to take that object’s name. In this case, we are asking the code block to show the name of the parameter called “Type”.

You can look for more information in the Design Script document. It would be very useful to use design script in code block.

---

<div class="post-metadata">

**Author:** ![Congzheng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@Congzheng](https://forum.dynamobim.com/u/Congzheng)\
**Post date:** [January 27, 2021, 11:19am UTC](https://forum.dynamobim.com/t/get-parameters-data-types/56590/13 "2021-01-27T11:19:32Z")

</div>

> [@thongle3103](#):
>
> Design Script document

Nice ! Thank you very much.
