Dynamo, Revit to Excel

Hi,
I’m trying to export to excel, then modify and then re-import some data from Revit usign Dynamo.
I think I did it correctly, but I receive the error “Notice: Item. SetParameterByName operation failed.
The storage type of the parameter is not a string.”
When I exported, some of the parameters are integers, some are strings, some are real…
How to resolve this problem?
Thanks?

.

Please post a screenshot of the graph and sample data you are working with. It’ll help to verify that nothing else weird might be going on.

You can use Object.Type to troubleshoot your exported/imported data to verify the parameter types. From there you can use nodes to convert numbers to string and vice versa.

image

In python, most of the typing is handled by python. If it is coming back from Excel - it is probably just a string, so you’ll need to convert it to the proper format. For instance int(“1”) will force the string to an integer. It is more complex if you have 4’-2 1/2".

Hello @Ronin064

You can convert all the data in to string before feeding into “Set.ParameterByName”

1 Like

Hi @honeyjain619 …this way you will probably get trouble with string digits…think we need something here…

1 Like

@sovitek ,

Yes you are right
I my process extra 0 are appearing.
but there is one node “Number.ToString” from Spring will ease down this process.

1 Like

ohh yes…thats true :wink: didnt know springs node allows different object types, btw then i dont think its possible to control the digits…without trying :wink:

Most workflows i use export/import for in Excel to return values, i check for common data types and add them as a second header row, and then in dynamo i separate the columns by type and convert them from text to their proper type.

I usually force all fields to be text in excel because sometimes they come back with formatting errors from excel (e.g. datetimes). Sometimes I will use dynamo to add a ’ before all fields also so that excel doesn’t do things like turn ‘0X’ strings into numbers and remove zeroes automatically.

1 Like

yes thats a way too Gavin :wink:

1 Like

Thanks for Your reply…
I’m not allowed (as new user) to export attachments… :woozy_face:

At the moment I thank You all for you reply… going to study deeply how to apply your tips…
Hope I’ll let You all know about my enhancements…
I’ll look how to give the correct type…
Thanks…