All rooms with the same value in the string parameter [FM_Raumnummer] should add up their areas and write them to another parameter [FM_Raumgesamtfläche].
I got it so far that I could add the areas from the rooms via Groupbykey + Math.sum so if room “41.F13.3” exists 3x these areas are added together as shown in my picture.
48.66
20.28
41,20
= 110,14
This value “110.14” should be fed back into the respective 3 rooms in the parameter “[FM_Raumgesamtfläche]”.
That all 3 rooms have 110.14sqm2.
Unfortunately, Dynamo goes through the ID list for me and enters 110.14 for the first “41.F13.3” room, 35.56 for the next and 47.35 for the third.
Since I am slowly at the end with my ideas I ask you there is a possibility best with Vanilla Revit means (so preferably no packages) Python script only if it works. I also asked chatgpt for help but I can’t get any further with python either.
You need to group the room elements before doing anything else. Once you have the rooms grouped by FM_Raumnummer, the rest of your logic can be run from that list of rooms. It will maintain the same structure (each group representing the FM_Raumnummer) so that the totals already align with the groups. You can’t use the original list of elements after the parameter info has be reordered and grouped.
Can you briefly list which nodes I need and which ones are related, because I use get.parameterValueByName and group accordingly. But if I understand them correctly, that’s wrong.
Hi everyone I have a dynamo script that works so far, but when I convert number to string it shows me several decimal places as you can see in the picture. But I only want to have e.g. 110,15 displayed. Does anyone know a solution?