Excel to Revit Families sorted via Excel Value

@Kulkul

I removed the List.GetItemAtIndex node but I am not sure what to connect to List.AllIndices “item” after…

Don’t want to derail anything here, but…

A dictionary might be nice here. Build from the elements as the values, and the number parameter values as the key. Then read excel, get the number parameters, get the value at the number key from the dictionary, set values accordingly on the returned list of elements.

2 Likes

hi

I was trying your files because I was experiencing a similar challenge myself. I am still new to Dynamo myself and am not a Revit user/engineer, so I might still get some of the terms wrong, but understanding the logic of Dynamo, I ended up with this version

by logic is should be right, we get the RestOfItems, and determine the ParameterName in SetParameterByName using a list

and the values should be the list of items at index under “P&ID Number”, which we have listed after removing nulls…

there is an error however, because GetItemAtIndex requires an Integer for index, and does not accept Strings

currently looking into the comment by JacobSmall, although Dictionary is a new node I tried in Dynamo and am still learning it


EDIT UPDATE
Tried something here. A bit messy and probably has some redundant/unnecessary nodes down there, but this is the flow I have gotten this morning.

After removing nulls, we have the 3 items, P&ID NUMBER plus the two entries under it, AA-12-GV and BB-14-CV. What I was trying to do is to get the INDEX NUMBER of both, which is 1 and 2 (because GetItemAtIndex requires an integer not a string)

I used FilterByBoolMask, connected the list, and made a condition that it does not equal (!=) P&ID NUMBER.

I tried getting the IndexOf to get their index number, but since P&ID NUMBER is gone, both AA and BB are now 0 and 1 respectively. I added a (+1) so they are now 1 and 2.

Plugging in this to the GetItemAtIndex, I see that both 0 and 1 lists have the corresponding AA and BB information

Only the AA values are getting plugged in however