Hello all! There are parameters MC CB Type and MC Protective device family. They are retrieved from circuits by ID. There are also parameters Test and Test2 in two families in the view (they are in yellow text in the last node). MC CB Type should be written to Test, and MC Protective device family to Test 2. Element.GetParameterValueByName seems to correctly retrieve parameter values from the circuits, but I cant seem to write them correctly to the families - they constantly get confused, jumping back and forth, and so on. If anyone could tell me what Im doing wrong, Id be extremely grateful!
We need to see the rest of your graph. If by “jumping back and forth” you mean the elements aren’t always listed in the same order, then something weird is happening elsewhere upstream.
Besides that, it seems like you have a list structure issue. You have two elements and two parameters. Right now, you’re getting the values of both parameters from both elements, giving you 4 separate values (GetParameterValueByName output). You’re then trying to write those 4 values to two parameters on two elements, which is also 4 permutations (SetParameterByName output). Assuming that your elements are in the correct order, you should be assigning the correct value to the correct parameter on the correct element. You’re just doing it for both parameters on both elements. If that’s not what you want, then remove the list levels from your nodes so you have exactly 2 outputs for each node.
Thank you! Its working!
If your parameters aren’t aligned with the correct elements then you need to align them. You get the parameter names from an Excel file. How is the Excel file ordered? Why are they in that order and not the order of the elements? If you have specific parameters in Excel for specific elements in Revit, then you need a way to align those objects. You can’t just grab your elements and assume they’re in the same order as your unrelated Excel file.
You need some kind of identifier (ID, name, type, etc.) in the Excel file to tell Dynamo which element goes with which parameter. Then you can sort them automatically and ensure that both lists are aligned.
I havent problem with CSV. Its working correctly. The problem appeared after I changed the set parameters into families only in the active view to set parameters into families in all sheets (filtering sheets by name). Somewhere at this stage I got confused with the levels again, I suspect.




