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" ?
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
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?
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.
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