I’m trying to make a dynamo script in order to create a door takeoff. The project is made of 2 buildings so two models that i linked into the revit file i created.
In my company we have an existing takeoff basis that i have to keep and use.
So i would like first : copy ID of every doors into the project (first problem because I have 2 buildings I have 2 times the same ID…). I did it for now, this step is ok.
Then I would like to copy certains informations into the Excel file from the Revit model (infos that are existing). Like type parameters, for now I don’t know how to get those parameters.
And then I would like to copy certains information into the Revit model from the Excel file (I will write those infos directly into Excel then I want to export them into the model). I will attribute them into shared parameters that I created.
So I have to read and write at the same time the Excel file. And the most complicated for me is I don’t know how to tell the info has to go there. The door parameter has to match with the right ID. In accordance to the ID I get into Excel, Dynamo has to put correct infos about the door concerned.
I don’t know neither with “list get item at index” node how make it start from the Excel line i want (i only could choose the column with a “number” node links to the index.
Does someone can help me with my script ? and tell me if my way to do this is right ?
Key here is not to use ElementId, but ElementUniqueId
Normally the chance of having duplicate UniqueId’s is one in a zillion.
Unless you have made a copy of model 1 and renamed it to model 2
Thank you Marcel! very interresting link!
However, I’m very confused about how to get datas into the right element.
I finished my script, I import 7 parameters (from Revit to Excel) and I export 4 parameters (from Excel to Revit).
So the script works for everything, because i get datas about those 11 parameters BUT they are not at the right place! For example, if i look at the door A it will get the name of the door C and maybe the width of the door F. The script mixes every datas and I don’t know how to do in order it respects the link between imported/exported data and ElementUniqueId door.
Can you please help me with this? Do you have an idea?OV_Script_Import_Export_Tableau_Portes.dyn (62.9 KB) 20180919-LESC-APD-Tableau_portes_trame.xlsx (73.7 KB)