How to get parameters value of a document in Dynamo

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.

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)

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

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.

1 Like

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

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.

1 Like

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

1 Like

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.

Thanks @Marcel_Rijsmus

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

For getting Linked Elements.

image

2 Likes

maybe something like this

2 Likes

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 :slight_smile: