Set Type Parameter from grouped list


#1

Hi.

First of all: I am a total beginner in Dynamo and my English is not the best…I hope you understand me anyway.

 

I am trying to make a program in dynamo to Count and report the total number of doors swinging to left and right for each family type.

The first step is to report if the door is left or right swinging and set the type parameter “comments” to “höger” (Swedish for right) if its right swinging and “vänster” (Swedish for left) if its left swinging". The type parameter “comments” is then to be used by a tagg in revit. So far i have no problem and my program work as intended.

Next step i Think is to sort and Group all right/left swinging doors in to door types. I did so by the use of “Family name” and “Group items by key list” together with the list of all door elements swinging to right/left. I then used “List Count” and lacing longest and managed to Count the total numer of doors swinging to right/left for each door type.

Finaly i want to set a type parameter for each door type based on the value in the countlist. So the tootal numer of doors swinging to right should be written to a type parameter called “Numer of instances with right swing” and the total number of doors swinging to left should be written to a type parameter called “Number of instances with left swing”.

So for exampel door type “YD9” (in the pitcure) the parameter “Number of instances with left swing” should be 5 and the parameter “Number of instances with right swing” should be 1. Here is where i get stuck. Can anybody help me out. Any help will be appriciated.

Som explanation to the Picture:

  • The different door type is called YD9, ID10, YD8

  • Höger is Swedish for right

  • Vänster is Swedish for left

/Marcus