Importing Parameter Values from Excel to Revit

I have created a Dynamo file that exports parameters from Revit to Excel, but can’t seem to import things back into Revit from Excel. I was able to export room names and room numbers. Then, in Excel I created a new sheet with the exported room numbers and I matched values for a new parameter called “ExternalLoad” to the appropriate room numbers with a VLOOKUP function.

“ExternalLoad” is a shared parameter in Revit I created. It is a common text parameter that appears in the spaces schedule.

The error I am getting is : “Warning: No function called SetParameterByName on a Revit.Elements.Category that takes string_array could be found” Google did not turn up much when I searched this. Any ideas?

My second question is this - the “ExternalLoad” parameter will only have values for certain spaces (maybe 200 out of 1000) because this is only for exterior spaces. How do I make sure that the appropriate value for ExternalLoad is being matched up with the appropriate space (the correct room number)? It seems like with the Dynamo program I have created there is no matching and the values will just be imported starting at the top of the space schedule…

Any help is appreciated!!

You need to get the elements from the category;

There is a curious glitch I am finding with this method. When exporting the list of rooms and names to excel it exports in order of the ID. The problem with this that we did not create rooms sequentially, so when I export to excel the rooms come in in a way that I cannot easily modify.

I want to renumber the rooms in excel with a function. Therefore in order to export to excel from dynamo I’ve sorted the lists of names and rooms numerically prior to exporting to excel.

The glitch comes in when I try to reimport to revit from excel once these rooms are changed. The room names can easily be renamed with out issue and room numbers can have letters appended to the number. But if the number is changed or a letter is added as a prefix to the room number the entire file freaks out and acts completely irrationally.

Any assistance for sorting lists here would be great.
See image of the def. below and the associated warning spelled out below.

Warning: Element.SetParameterByName operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, Revit.Elements.Element)’ and ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, string)’

1 Like

@Nicholas.Jacobson You should start a new thread with clear image of your graph currently it is not clear. This thread is already solved long time ago. Thanks!