# How to get parameters value of a document in Dynamo

**URL:** <https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831>\
**Category:** Revit\
**Created:** [January 17, 2019, 5:01pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831 "2019-01-17T17:01:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mojtaba.vlj](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Mojtaba.vlj](https://forum.dynamobim.com/u/Mojtaba.vlj)\
**Post date:** [January 17, 2019, 5:01pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/1 "2019-01-17T17:01:52Z")

</div>

Dear friends  
Hi  
I am extracting some information from different Revit models in one only script. For this purpose, I opened my Architectural model, extract essential info from this model, then I used “ **Application.OpenDocumentFile** ” node to open my Mechanical model. But unfortunately I couldn’t extract “ **Family and Type** ” parameter values from the document (Mechanical model). I used three different nodes as shown in the first pic, but none of them worked.

 ![Getting%20Family%20and%20Type%20parameter%20from%20Document](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/1/91ea766601fa66215b6d6ad1cb6686ae03dec6b2.png)

It is very strange for me why for some parameters it worked and for some of them do not work (as shown in below pic)

 ![Getting%20%20parameters%20values%20%20from%20Document](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/9/698af8fa2b3d71f108c2df920e1e1ef6516d46ca.png)

Can anybody tell me where the problem is? Thanks a lot

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 17, 2019, 5:10pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/2 "2019-01-17T17:10:23Z")

</div>

In picture one where do the elements come from? It does not look like they are from the document you are feeding it.

_Element.GetParameter…_ you are just asking for Family. Do those elements have a parameter Family? grab the first element and use _Element.Parameters_ and check to see if Family is there.

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

---

<div class="post-metadata">

**Author:** ![Mojtaba.vlj](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Mojtaba.vlj](https://forum.dynamobim.com/u/Mojtaba.vlj)\
**Post date:** [January 17, 2019, 5:29pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/3 "2019-01-17T17:29:36Z")

</div>

Thanks @Steven for your response. In picture one, the elements are from the document I am feeding it. It does not look like it since I cut my script to take the screenshot. Yes. When I open my Mechanical model and run my script, it could extract all families of the elements of category. Instead of opening 5 scripts for 5 disciplines, I am combining them together to open and run only one script. As you suggested, I used _ **Element.Parameters** _ to check if Family is there and as you see below, it is there. All these elements have parameters that turned yellow in my previous pics

 ![Element%20Parameters](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0c990e4e3e68bf216fe5c3dca29de67a10b78b99.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 17, 2019, 5:43pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/4 "2019-01-17T17:43:02Z")

</div>

How are you opening and getting the elements from each file? With out seeing where the elements come from its hard to say why it is failing. Can you also provide the warnings that are being produced.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 17, 2019, 5:59pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/5 "2019-01-17T17:59:11Z")

</div>

why not extract it from the linked model without opening it?

---

<div class="post-metadata">

**Author:** ![Mojtaba.vlj](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Mojtaba.vlj](https://forum.dynamobim.com/u/Mojtaba.vlj)\
**Post date:** [January 17, 2019, 6:31pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/6 "2019-01-17T18:31:38Z")

</div>

As shown in the pic below, I used “_Application.OpenDocumentFile_” and _File Path_ to read the Revit model and then get all elements from a 3D view. It is very strange that for some parameters, it worked and for some it does not work. For example, for _Family, Type, Phase, and System Type_ it doesn’t work. For some other parameters like _Element ID, Workset, System Classification_, it works.

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

---

<div class="post-metadata">

**Author:** ![Mojtaba.vlj](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Mojtaba.vlj](https://forum.dynamobim.com/u/Mojtaba.vlj)\
**Post date:** [January 17, 2019, 6:32pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/7 "2019-01-17T18:32:22Z")

</div>

Thanks @Marcel_Rijsmus

Do you have a simple example to show how we can extract parameters from a linked model?  
Thanks

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [January 17, 2019, 6:54pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/8 "2019-01-17T18:54:18Z")

</div>

For getting Linked Elements.

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

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 17, 2019, 6:54pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/9 "2019-01-17T18:54:18Z")

</div>

maybe something like this

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/9/0943035e350751d521e9064923862489f93d2c85.jpeg)

---

<div class="post-metadata">

**Author:** ![Mojtaba.vlj](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@Mojtaba.vlj](https://forum.dynamobim.com/u/Mojtaba.vlj)\
**Post date:** [January 18, 2019, 2:46pm UTC](https://forum.dynamobim.com/t/how-to-get-parameters-value-of-a-document-in-dynamo/30831/10 "2019-01-18T14:46:05Z")

</div>

Thanks dear @Marcel_Rijsmus and @Steven for your helps

Actually I was asked to use _File Path_ instead of using the linked model. I am still working on it but I have not found a solution for it. Do you know if there is any python code to extract parameters values from a list of elements?  
Thank you so much in advance 🙂
