How to find value of built in parameter without knowing category?

Hello everyone,
I have prepared an excel table in which I have collected built in parameters (BIP) that I need (import). I want to find out the values of the BIP. However, the problem is that I can not find the category and I do not know how to access these parameters and give a value in case. For example, how can I find out the sum of all rooms?

I am so happy for some help! I am completely new to Dynamo and I am trying hard to gather all information out of the forum but couldnt reach what I need…

Thank you so much!

https://forum.dynamobim.com/t/get-project-parameters-parameter-data-name-disc-type-group-and-categories-they-belong-to-to-export-in-excel/51027https://forum.dynamobim.com/t/how-to-know-if-built-in-parameters-are-type-instance-family-parameters/61503 …

1 Like

I’m not quite sure I’m following your problem, but you might be able to use the GetParameterValueByName node to report information.

You can also use a GetCategory node to report the category of the elements you feed into it, if that is of use to you?

When you say sum of all rooms, do you mean the sum of the room areas?

If so, you’ll want to get a list of all rooms (Categories node set to Rooms → All Elements of Category node), then from that you’ll want to use a GetParameterValueByName node and a code block that says “Area”; (there might be a node that reports area, I’m not at my pc so can’t check).

This will list out all the room areas, which you can do what you like with.

Hello Dan,
thank you very much for your answer! Yes, I dropped using the built in parameters and switched to the method as you suggested. Its not actually what I was looking for but it works, thank you :slight_smile:
About the sum of the areas, is there no way that there is a parameter that already has the value which I can just extract? I hoped, for instance ANALYTICAL_MODEL_AREA already has the value

There might be a node that allows you to feed in a list of rooms and it output the areas (likely called Room.Area or something like that) but I’m not at my pc to check. The GetParameterValueByName method explained above will give you what I think you are after, using 2 nodes rather than 1.

I fear however that I’m still not fully understanding what you are looking for as an end result.

Are you looking to extract parameter values from your model? Or parameter names themselves?

Are you looking for this?

image

Hello,
what I originally wanted to find out is how to find out to extract all information what is marked yellow because I only get null (red marked). How I understand it now, it is not that easy as I imagined to extract the information from the BIP but I need to create my code for every single parameter. Is it right, would you agree with me?

(like here: Sum of Gross Area)

Do you have parameters in the model that are named exactly like that, with the same capitalisation?
I’m not familiar with this GetBuiltInParameter node, but I don’t think this will return the value of the parameter.

Try replacing it with GetParameterValueByName.

Those parameter names are an extract of the built in parameters, available here:

or https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Revit-Built-In-Parameters-names-list-in-multiple-languages.html
BuiltInParametersRevit2022.xlsx (1.6 MB)

I also don’t know about this “BIP”…

I would use the element.getparametervaluebyname as shown below.
You’ll need to trust me on this cause i am blurring for confidentiality.

1 Like

What your script is doing is trying to get each of the 14 Built In Parameters against each element - if it returns a null the parameter is not present in the element

The Bip are basiclly what you would use if you script via C# and python. its not applicable to dynamo nodes. and even when working with them in script you would have to know from which categories to get them to actually be able to use them.

i am afraid that what you are asking for is kind of hard. if you know which categories you need the data from there is a lot of ways to move forward but without that information yah its not going to work.

Alrighty, thank you everybody for your help! It helps me to understand :))

Here’s how you can get the elements which have a BuiltInParameter by the parameter name as a string e.g. "ROOM_AREA"

import clr

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

bip_name = IN[0]

fec = FilteredElementCollector(doc)
bip = eval("BuiltInParameter.{}".format(bip_name))
rule = ParameterFilterRuleFactory.CreateHasValueParameterRule(ElementId(bip))
epf = ElementParameterFilter(rule)
OUT = fec.WherePasses(epf).ToElements()
1 Like