Keep order of imported/exported datas Revit/Excel

Hi everybody,
I have a problem with my script. I import and export datas concerning a revit element (doors). So i export some datas from revit to my excel file and i export some datas from my excel file to revit, in order to have a 3d model containing same infos i have in my excel files.
So the problem is, every data is going at the wrong place and i don’t know how to keep the order or the link to obtain datas at the right place (to the right element). For example, no matter if i export from revit or from excel, door A will have a parameter from the door B and another from the door C. The importation/exportation work but datas go anywhere.
Is it possible to link every datas imported/exported with the unique ID Element?
(datas exported from excel to revit and datas exported from revit to excel are not the same)

script_part02
Any help will be welcome!! thanks

@r.machicot

here is a good example of how to work with this

http://www.revit.com.au/1564/

Thank you Marcel, but the problem is I can’t use Element.UniqueId node with 2 differents families.
I would like to get automatically room name for each door but I can’t find a way to do this. I can’t link Element.UniqueId to the door category too…
Do you know a way to get for each door the name of the room where it is located? I tried to use door rooms node but it wasn’t successful…

does this help?

thank you , but not so much…
I tried 2 solutions :

  • solution 01: i used Door.Rooms node but when I link it to the list create it doesn’t work, maybe I have to delete the second terms into each list (like represented on the pic) but I don’t know how to do it… do you habe an idea?
  • solution 02: i used another category to get room name create by the Architect but I don’t know if it’s possible to link it with the Door Element.UniqueId…
    If you have any idea it will be great!

OK, first
Can you check if you have any unplaced or unbounded rooms and if so, fix it? it will create errors
Can you clean you excel file too? there is loose data in the last rows

I think your right, there is a lot of unbounded rooms. But it’s weird because when i look at the architect model everything seems ok (rooms are closed by walls or rooms separator). Furthermore, some rooms are not create for now (like you can see on th pic). I don’t know if it make the node not working

Did you see that there is not only a room.doors node, but also a doors.room node?

Yes I used it in solution 1 (like you can see on the post before). But I can’t link my get parameter value by name node to my list create node (like I did for my others parameters). I think because I have 2 rows in each list I got (“from room” and “to room”). I tried to remove a row in order to see if it’s work, but I don’t have a solution to do it

every door has two rooms assigned to it, and some rooms may have two doors

what are we going to do?

yes, totally… I don’t know, I’m not good enough with dynamo to find something which could work. I think I will do it manually into an Excel file…:disappointed:

let’s not give up just yet.
The UniqueId method, did you try it?
I could not find any Id’s or UniqueId’s in your excel file (which you must include in this question aswell, not only in your other question)

Do you know why I have some issues with the ElementSelector? I know you said it’s kind of sensitive but I think I did everything right. And when I’m writting the script into the code block I have 2 inputs (id and ElementSelector) not only “id” like you have

Thats what they call a NameSpace collision

If you use Revit.ElementSelector.ByUniqueId, does the extra input disappear?

Yes you’re right! thank you. But I can’t get datas into my revit model.I don’t understand why

You have to get rid of nulls in you list, they produce the errors
There are several nodes to do this.
image

ah ok, or maybe i have to start from my 4th row because the three first ones are for column title that’s why there is nothing…

Yes!

image

perfect! thank you, this issue is solved. I can focus on getting rooms name for each door