# Excel to rooms by ID

**URL:** <https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777>\
**Category:** Revit\
**Created:** [January 11, 2017, 9:41am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777 "2017-01-11T09:41:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![3Pinter](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/3pinter/32/74327_2.png) [@3Pinter](https://forum.dynamobim.com/u/3Pinter)\
**Post date:** [January 11, 2017, 9:41am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/1 "2017-01-11T09:41:13Z")

</div>

Eventhough a lot is written, I can’t figure a few things out myself. I want to import excel data into Revit using ID.

Working workflow::

1. export rooms with finishes to excel.
2. in excel use that data to fill a ‘roomfinish worksheet’
3. in excel another worksheet ‘export’ is autofilled with the ‘roomfinish worksheet’.

So step 3 is an excel worksheet which has the columns:  
“ID” - “Name” - “Number” - “Wall Finish” - “Ceiling Finish” - “Floor Finish”

So step 4:  
Dynamo: read excel, grab columns list transpose etc.  
so dynamo should grab ID, select that element, set that element paramater values by columnvalues.

Step 4 doesn’t seems to work for me. Why?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/6/664cb74dab0ea3d90116f792cc11c2471d8d6276.png)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 11, 2017, 9:51am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/2 "2017-01-11T09:51:35Z")

</div>

First make sure your IDs are numbers (with an _Object.Type_ node for instance). If not, use a _String.ToNumber_ node

---

<div class="post-metadata">

**Author:** ![3Pinter](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/3pinter/32/74327_2.png) [@3Pinter](https://forum.dynamobim.com/u/3Pinter)\
**Post date:** [January 11, 2017, 10:16am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/3 "2017-01-11T10:16:19Z")

</div>

Object.Type string result:  
list  
0 System.Double  
1 System.Double  
etc.

String.ToNumber result  
errors in: “Warning: One or more of the input types are not matching. Couldn’t find a version of ToNumber that takes arguments of type (\_\_array)”

---

<div class="post-metadata">

**Author:** ![Chandrasekar\_Rajaman](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Chandrasekar\_Rajaman](https://forum.dynamobim.com/u/Chandrasekar_Rajaman)\
**Post date:** [January 11, 2017, 10:29am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/4 "2017-01-11T10:29:40Z")

</div>

HI @3Pinter  
Curious why it’s not working…

Can you upload the .dyn and the Excel file?

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 11, 2017, 10:40am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/5 "2017-01-11T10:40:18Z")

</div>

Be aware that IDs are not definitely fixed. I would rather use GUIDs instead.

---

<div class="post-metadata">

**Author:** ![Chandrasekar\_Rajaman](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Chandrasekar\_Rajaman](https://forum.dynamobim.com/u/Chandrasekar_Rajaman)\
**Post date:** [January 11, 2017, 10:44am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/6 "2017-01-11T10:44:34Z")

</div>

Are we trying to set IDs also from Excel? Is it possible?  
My understanding was that objects’ ID (GUID) is set by Revit and like some other parameters, it is read-only…

Correct me if wrong!!

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 11, 2017, 10:58am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/7 "2017-01-11T10:58:06Z")

</div>

I think he is trying to get elements from Revit from their ID numbers and set some of their parameters.

---

<div class="post-metadata">

**Author:** ![3Pinter](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/3pinter/32/74327_2.png) [@3Pinter](https://forum.dynamobim.com/u/3Pinter)\
**Post date:** [January 11, 2017, 11:08am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/8 "2017-01-11T11:08:22Z")

</div>

@Yna_Db you are right.

See attached files (excel, dynamo).  
Oh and should I use GUID instead? if so: those are custom nodes right?

[test.dyn](https://forum.dynamobim.com/uploads/short-url/lyWEgLBRi2mfZZbN5Z1vj4Jz8TD.dyn) (35.9 KB)  
[afwerkstaat\_test.xls](https://forum.dynamobim.com/uploads/short-url/bC9RPUlHr9RTVMalPunEhCnPQ6X.xls) (74.5 KB)

---

<div class="post-metadata">

**Author:** ![Nico\_Stegeman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nico_stegeman/32/19204_2.png) [@Nico\_Stegeman](https://forum.dynamobim.com/u/Nico_Stegeman)\
**Post date:** [January 11, 2017, 11:08am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/9 "2017-01-11T11:08:29Z")

</div>

Yna  
question:  
in a project is an id unique in that project or not?  
and revit wil not change that by itself or not?

Guid numbers are unique in the hole world correct me if i am wrong

But how do you get Guid numbers of a element with Dynamo?  
(I can find an Guid number of an element with revit lookup snoop current selection )

nico

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 11, 2017, 11:20am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/10 "2017-01-11T11:20:07Z")

</div>

The elements IDs can change but the GUIDs are stable. There is a node called _Revit ID_ in the _Hot Gear_ package that will give you these GUIDs.  
For more explanation, please see on Revit forums:  
[http://forums.autodesk.com/t5/revit-api-forum/unique-id-vs-elementid-which-identifier-to-stored-in-the/td-p/4962636](http://forums.autodesk.com/t5/revit-api-forum/unique-id-vs-elementid-which-identifier-to-stored-in-the/td-p/4962636)  
And also, _Id to Element_ from _Archi-lab Grimshaw_ accepts GUIDs

---

<div class="post-metadata">

**Author:** ![Nico\_Stegeman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nico_stegeman/32/19204_2.png) [@Nico\_Stegeman](https://forum.dynamobim.com/u/Nico_Stegeman)\
**Post date:** [January 11, 2017, 11:36am UTC](https://forum.dynamobim.com/t/excel-to-rooms-by-id/8777/11 "2017-01-11T11:36:45Z")

</div>

Hello pinter

I think if you import something from excel then you already lost a lot revit data.  
the element no longer hangs the Ceiling Finish parameter so that’s why you always are getting an empty list at Element.SetparameterByName as it does in this way.

you have to work with lists to select the different parameters

or select again the same elements with dynamo by using guid id

Archi lab Node:

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/d/1/d1ec4eaab07bc7bbe4f7b34f666c0580e015877a.JPG)
