Excel schedules to Revit

I’m in the process of setting up schedules from excel to be imported into Revit. One thing I can’t work out is how to match the correct piece of equipment in the schedule to the correct piece in Revit. At the moment in the schedule, I have the following

The AHU-10-01 data is imported into the first AHU I placed into Revit, and so on. Is there a way I can automatically link this all up?
I was thinking of using tags, but wasn’t too sure how to go about this?

Here’s how I’ve read in the schedules from excel

This is my attempt at a solution at the moment, however it’s not working as I’m not really combining two lists like before, as two of the inputs are from Revit, not Excel

Hi @voss836

Can you try choosing actual object Category (for example, Mechanical Equipment) instead of Tags in the Categories?
In my opinion, the Tag itself would not have the parameters… The object category would have the parameters and Tag Family is set up to “read” & display the value of the parameter.

Another way to confirm is by using element.parameters node to list all thye parameters of that element type… In this example, plugging in the Object Category & the Tag Category would list the parameters differently.

Hope this helps

@Chandrasekar_Rajaman what I realised I need to do is to have the schedule with all the equipment names, and then manually name each piece of equipment so it matches the schedule names, and then it will be able to automatically import the data. But I can’t find a way to tag equipment with text, it all works off parameters.

Hi @voss836

Can you upload the following?
Revit file (2016)
Family file (rfa) of the equipment being used (if not loaded already within the file)
Excel sheet with parameters or a table showing Revit parameter name & the corresponding value to be filled from Excel…

Hi @Chandrasekar_Rajaman

I’m running Revit 2017 so unfortunately you won’t be able to open it with 2016.

Hello, quick answer: you will probably need to link your datas using GUID, see this for instance:

Using a dictionary could also be necessary:

I’ve had a bit of a look and don’t really understand how the GUID’s will work. From what I understand is that they are unique to the object itself regardless of who’s using the file. But let’s say I have 5 AHU’s in a Revit model, and get the GUID’s for each. How will each data column in excel, corresponding to an AHU in Revit know the order? Won’t I still need some way of explicitly saying?

In the picture above, you can see the 5 AHU’s I’ve read in from Revit have the same order of Revit ID’s (shown in blue), which makes sense. But from the Equipment names read in from Excel, I have AHU-10-01 up to AHU-10-08. What I want is to have
Revit ID 1098360 = AHU-10-05

Revit ID 1105889 = AHU-10-08
Revit ID 1107664 = AHU-10-01

and then have the remaining AHU column data ignored, as they aren’t found in Revit. This is why I was thinking I’d need a tag or something in Revit with the name “AHU-10-05” etc, or something similar.

@voss836

My 2 cents! Guess it will be a 2-step process: (Similar to the link with room ID posted by @Yna_Db)

First step would be extracting the AHU ID and the Unique Key (GUID) to Excel
Use that as a starting point to populate the excel info based on the AHU ID
Agree that most of the work is done in Excel

But when it is read again using Dynamo, all data would be sorted together by ID (to fill up values of the other parameters) - Hope that would help your workflow.

@Chandrasekar_Rajaman
the problem with doing that is I am given the excel sheet from a 3rd party, so my aim is just to upload into Revit, not the other way around.
I can easily create a parameter in excel that holds the name of the equipment (user inputted), and then from there I basically want to upload the corresponding column of data

@voss836

If that’s the case, all you have to ensure is that AHUs are sorted in the same order in both Excel & Dynamo.
Can you try this:
Use Dynamo to extract all AHU’s in the model (List)
Use Element.Name as the Key when using List.SortByKey and the List (above) as the List to Sort
That way, you will get a list sorted by Name
Sort the Excel data in the same order
Then it’s only a matter of setting the Parameter values.

Something like this:

Hope this helps!

@Chandrasekar_Rajaman

Maybe I didn’t understand what you meant there, but if I still have to sort the excel data columns into the correct order manually, then that defeats the whole purpose.

@Chandrasekar_Rajaman

Here’s a full picture of what I have


Is there a way of comparing the blue circle strings against the red circle strings, getting the corresponding indexes from the red circle, and then organising the red circles data order into the black circle.

Example:
AHU-10-05 has an index number of 4 in the red circle
AHU-10-06 has an index number of 5 in the red circle

AHU-10-01 has an index number of 0 in the red circle

Then I was thinking of transposing the lists so it’s all in columns with respect to the AHU’s, then going to the fifth index for AHU-10-05 etc and keep looping through until they’re all done. This is the part I can’t work out how to do, as the AHU’s in Revit are currently organised and showing up in the order of them being added.

@voss836

From the Excel Data, I see that that list is “in logical order” (AHU-10-01 to AHU-10-08)
The AHU objects in Revit are in random order - So they need to be sorted (which is what I was suggesting earlier)

Use the List.SortByKey node and input Mark as the Keys (from the top left group in your graph)
For the List input, plug the output of “All elements of Family type”

Output of Sorted List will give you the AHU’s sorted in the same logical order as the Excel. This would do what you have in mind… Try it & if not working, post the output

BTW, just curious, why is there only 5 in one list & 8 in the other?

@Chandrasekar_Rajaman
There was only 5 in one because I was seeing if it’d work without having the same number in each.
And I think I misinterpreted what you said last time, it’s all working fine now. Thanks for your help