Show to Sort Lists Before Exporting to Excel

I am a new Dynamo user, I have created a file that will export Room data from Revit to Excel but it is not in any particular when it is exported. I am looking for a way to sort the Lists in alphabetical or numerical order before exporting to Excel.

The image is of my file configuration.

In excel, the data comes in looking like this (all jumbled and in no particular order)

  • Mechanical
  • Surgery
  • Waiting
  • Surgery
  • Admin

And I would like it to be sorted like this (in alphabetic or numerical order)

  • Admin
  • Mechanical
  • Surgery
  • Surgery
  • Waitng

Any help or advice would be much appreciated!! Thanks! --Jared

4 Likes

WOW! Thanks for the simple solution and fast response! That is exactly what I was trying to do!

You could sort your roooms before you get the parameter values from them:

1 Like

@jbrown914 you can also simplify your graph by using cross product on the get parameters node

or using a designscript with replicator guides.

1 Like

@Einar_Raknes,
I tried your suggestion and the issue is the output of the Sorted List does not display the room names, it only shows the room ID tags instead.

Einar’s suggestion sorted the elements by a parameter value. you have to then feed that sorted list of elements into the get parameter node to get your sorted parameters.

Yes it outputs exactly the same as “All Elements of Category”, only it’s sorted by the Names of the rooms. After that you must use GetParameterValueByName like you did.(In your graph, just insert the extra nodes before the watch node)

Oh ok! Sorry Im still trying to figure this program out! Thanks again!


Hi every body, in my photo, i want to sort level by order. Please show me how to do. Thank you all so much!

Hello.
Please start a new topic with your specific problem instead of reviving a 2 year old topic of a different problem. It helps to keep things organized and this specific problem has already been solved. You can link to this thread or mention people specifically (using @name) on your new topic.

Thanks you!