Sort selected Revit Element as per Revit Mark Value

Hi all, I am very New to Dynamo. Trying to take revit element’s parameter value to Excel, edit and bring back to revit schedule. in this process I am facing 2-3 issues Can any one please help me.

  1. Unable to sort elements selection as per Revit element mark value.
When I use sort list node the list getting sorted but not the selected elements sequence. The sorted list still follow the revit element id sequence, because of this, after I run dynamo script it change Mark value of say beam B1 to B7, when I bring back to revit the mark value of B1 change to B7.(When I bring back from Excel, I want Mark value unchanged and other shared parameter value should be changed..)

<b> 2. Apply 1 parameter value to multiple elements in Revit, based on Revit element mark value. </b>

While taking to Excel I used the Node List.UniqueItems to remove all repeated values. So that even though I have say 7 number of Beam B1 in revit Still I need to edit 1 Beam B1 parameters in excel. (this is fine till here.) But when I bring back from Excel I want all Beam B1 parameters value to be replaced as I edited in in excel and the mark value of Beam B1 should remain as B1. Is that possible …? I know this might be simple in dynamo to all of you. But even though I try so much I am not able to resolve this in my level. Can any please help me regarding this Thanks and Regards,

Hi Venu, You could use List.SortByKey to achieve your sort, and a combination of List.getIndex and List.GetItemAtIndex (a fairly crude lookup layout) to map your new parameter values onto your elements. There’s probably a more elegant way, but these will get the job done. Cheers, David LookupBTW, I’m not sure why in your layout you are feeding “Mark” into SetParameterByName’s Name input, because that will set the Mark parameter to the value you supply. It does not sound as though this is what you are trying to do… Also, it isn’t clear why you are feeding your filtered and sorted list of Mark values into this node’s Value input??

Hi David,


Thank you for your support. I really appreciate your time and effort. I am very new to dynamo took some time for me to figure out the answer you send me. It really helped me to get what I look for.


When I take this to next level, still I am not able to replace the parameter value which I bring from Excel to Revit via dynamo to multiple elements. Is there any way you can help me regarding that. For example I got 10 number beam B1 (Mark Value B1) in my model all these 10 beam I want to write a text shared parameter REMARKS value as “Inclined beam” Is that possible in dynamo…? In my revit model Mark value B1 means remarks value should be “Inclined beam” Is that possible to distribute 1 parameter value to 10 elements in Revit … Please help me