Searching the matching Index and transferring the index to another list

Hello All,

Basically I am trying to transfer the data from Excel to Revit using Dynamo. The main idea is to assign the values to the Scheduled Keys for the Room styles. First the values in the Code column is entered according to the Room names then dynamo extracts the Value of the Code using “Spring Collector Element in View”. After this Initial step the Code Values has to be compared with the Excel sheet data Code values and the matching values has to be assigned to the respective parameters (Like Occupancy,Ceilings finish etc. in this example).

I started with this process but I couldn’t go further in order to achieve the thing as shown in the picture below.

Please help me or guide me with the further steps to solve it.

Thanks.

Is there anyway to go ahead with this?

Hello, quick answer: I would try the Dictionary.ByKeysValues method for this (Springs node) since it returns results from a list where values are already associated together.

1 Like

As @Yna_Db stated you can use dictionaries for this. Don’t have to use custom nodes either. Designscript have that capabilities “in-house”.

5 Likes

Thanks a lot @Yna_Db and @jostein_olsen. It solved the problem so easily :slight_smile:.

I am sorry for this basic question I still couldn’t grasp because of my ignorance in design script, how the list a[i] checks the equality of j and returns the value to a[k].

Thanks once again for your time.

2 Likes

No problem Raja. This is not elementary Dynamo knowledge, so please do not excuse youself for asking. You have indicated a clear intent of what you want to do and you have shown us your own work. It makes it pretty easy to be of assistance. Next time, you can probably help others with the same question. Keep it up and best of luck in your dynamo endeavours! :slight_smile:

2 Likes

Thanks for your positive words @jostein_olsen sure will help others the next time :slight_smile: