Excel to rooms by ID

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?

First make sure your IDs are numbers (with an Object.Type node for instance). If not, use a String.ToNumber node

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)”

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

Can you upload the .dyn and the Excel file?

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

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!!

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

1 Like

@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 (35.9 KB)
afwerkstaat_test.xls (74.5 KB)

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

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
And also, Id to Element from Archi-lab Grimshaw accepts GUIDs

1 Like

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:

1 Like