Match values to revit elements

Hi. So, I got 3 lists. 2 of them are corresponding to revit elements. (I filtered them through a value in the comments section), and the third are the values I want them to replace. The first 2 are to correspond the elements to the right value I want to replace. Maybe with an image will be easier.


The first is the list of the elements (1 to 10) and the second both lists from excel which have the “ID” (1 to 10) and the value I want to replace. Thanks

From my understanding of your post - You are trying to re-associate the data to the elements? Correct?

Where is this data from? A previous export?

yes. In this case a diameter. I exported from excel a list like this

Pipe Diameter
1 20
2 20
3 20
… …

(for example)
And I associated each element to a number on the comments section, so pipe “1” has 20 mm diameter. I already have the lists, but I can’t make the connection from the pipes to the corresponding element. So, Element 1 should corespond to “1” and so on. (The values are already organized, I just need to pick point them) (sorry for being so explicit but I think is the best way to be clear)

Try GroupByKey to group elements by their comment value or, better yet, use a dictionary to return the pipe diameter based on comment value.


Then your element order doesn’t matter. You just get the comment value, your dictionary returns the diameter, then you set the value.

In your original export, I would suggest exporting the elements ID’s - so that during your import you can associate each piece of data with the element.

Export: Log Element.ID to your list

Import: Use Element.ByID (clockwork) to re-associate those elements as intended.
image

I can’t find the “element.by.ID” node

Ok, i’ll give it a try, although I still have to learn how that works. Thanks!

So, as far as I understand your question, you need the ‘true’ values from the first image to join with the pipe diameter from the second image lists.
You can use this node.Capture

I am sorry if it does not help you. I did not quite get your question right. Please feel free to like if it helps you.

Should be part of the Clockwork package of nodes.

Hope this helps, or leads you to your goal!