How to get the parameters of a family that is in a space, with a condition

Helo !!,

I explain you my goal

I want to select the family instances in Dynamo for Revit using a shared parameter called “start”, and display only the instances that have a value of “1” for that parameter. Then I want to get the spaces associated with these filtered families and any type of parameter that meets the condition of “start” being equal to “1”.

example:

SPACE 1:

Family 1 :
Parameter 1 = A
Parameter 2 = B
Parameter 3 = C

Family 2 :
Parameter 1 = D
Parameter 2 = B
Parameter 3 = E

space 2:

Family 1 :
Parameter 1 = F
Parameter 2 = B
Parameter 3 = G

Family 2 :
Parameter 1 = H
Parameter 2 = I
Parameter 3 = J

I would like to be able with the “parameter = B” to be able to sort and have all the parameters of the families associated to this parameter according to the space, write in an excel :

Cell 1: Space 1 + Space 2 (addition of strings containing the shared parameter (parameter = B) attention if two families are in a space and they have the (parameter = B) I should not write twice the same name of the space in the cell.

Cell 2: The number of family containing the parameter

To summarize, I want to filter the family instances in Dynamo for Revit using a shared parameter called “benchmark”. You want to display only the family instances that have a value of “1” for this parameter and then you want to retrieve the spaces associated with these families. Finally, you want to write the names of the spaces associated with the parameter in a single Excel cell, without repetition, and write the number of families that contain that parameter in another cell.

My first question is going to be how I can filter all my spaces with the condition of displaying me only the spaces with the families that contain 'parameter =B" ?

1 Like

this would be the filter as for the spaces that would require you to have an actual object inside revit where you check if the they are within the spaceses boundingbox in other words you need an object the check against a room works as does an object/family

@b.damemme ,

that can be a start in dynamo


or just make a schedule!
2023-02-08_08h39_19
KR
Andreas

what is allgemeines modell, i dont find the same in french for dynamo?

Is it something to do with my family?

1 Like

generic modell @b.damemme

1 Like


I tried your method, I just changed room by space,
I have the impression that the code block doesn’t work for me

1 Like

@b.damemme ,

the codeblock needs a input! generic models !

check out this first

1 Like


OK its good for code block, thanks ^^,

I adapted my categories by putting luminary, in codeblock I do not understand why it is marked (X.Name), I search in your document but do not see. I have the right to change Name by categories? I do not know what the Name represents

this code (x.Name == “B” ? true : false;) means what exactly?

Is the Name equal to B true yes false no ?

But what if it’s something else than the Name that I want to check?

how is the family attached to the space?

@John

My goal is to give a family parameter in a string.

Then to have all the spaces associated to this parameter

1 Like



filter space of elements(with specific value) in it.dyn (17.3 KB)
Hey I remember you use Revit 2022,So I test in Revit 2022,I don’t know which family you use in space.I just use desk as an example.The method are the same.

1.select all elements of the category
2.filter elements of specific value
3.get the space which contains that element

By the way,if you just get started,you don’t have to use codeblock too often.

1 Like

thxx!!!

First step is good !!!

My first question is going to be how I can filter all my spaces with the condition of displaying me only the spaces with the families that contain 'parameter =B" ?

I edit my first post and add a new question ;p

I can now, depending on a parameter, know in which space it belongs,

The idea would be to combine the name of the spaces and to add it in an excel cell, if possible it would be to make a line break in the cell at each space name

I think I can succeed like that to combine the name, but for the line break in excel ^^ it is another thing
the problem is that it’s not viable if I have X>2 spaces for example

image

image

you just have to make a line break in the void