Cannot deserialize System.Int64 to System.String
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.Dict2Base(Dictionary`2 dictObj)
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.ConvertJsonElement(JToken doc)
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.ConvertJsonElement(JToken doc)
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.ConvertJsonElement(JToken doc)
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.DeserializeTransportObject(String objectJson)
at Speckle.Core.Serialisation.BaseObjectDeserializerV2.Deserialize(String rootObjectJson)
at Speckle.Core.Api.Operations.<Receive>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Speckle.ConnectorRevit.UI.ConnectorBindingsRevit.<ReceiveStream>d__5.MoveNext() in C:\Users\circleci\project\ConnectorRevit\ConnectorRevit\UI\ConnectorBindingsRevit.Receive.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Speckle.DesktopUI.Streams.StreamsRepository.<ConvertAndReceive>d__3.MoveNext() in C:\Users\circleci\project\DesktopUI\DesktopUI\Streams\StreamsRepository.cs:line 46
I apologize in advance if I’m missing something obvious, I’ll blame it on the impatience of getting my greedy hands on this wonderful tool.
Can you try to use WALL_BASE_OFFSET as a parameter name instead?
We also changed a bit how these parameters should be sent to Revit from Excel (see docs), so your excel table should look like the below:
elementId
parameters.speckle_type
parameters.WALL_BASE_OFFSET.value
parameters.WALL_BASE_OFFSET.units
parameters.WALL_BASE_OFFSET.speckle_type
speckle_type
1101940
Base
0
mm
Objects.BuiltElements.Revit.Parameter
Objects.BuiltElements.Revit.ParameterUpdater
P.S.
We know this mechanism for an Excel<>Revit link is not ideal and we’re thinking how to improve it, see here a suggestion for a dedicated tool.
We are indeed excluding some parameters from that list, such as the Base Offset, as they are already included on the top level Wall element. Having them also inside the list of parameters could lead to inconsistencies:
which fields should I add to excel for the change to work? since WALL_BASE_OFFSET is not in the list, I’m adding: baseOffset, speckle_type, elementId, parameters.speckle_type.
parameters.WALL_BASE_OFFSET.value, parameters.WALL_BASE_OFFSET.units parameters.WALL_BASE_OFFSET.speckle_type are missing.
using ‘Set range with headers’ to send data from excel
error “Cannot deserialize System.Int64 to System.String on Revit side”.
ALL_MODEL_INSTANCE_COMMENTS in not in the list of parameters:
The order of the columns does not matter. Even if WALL_BASE_OFFSET is not in the list, you need to use that for the ParameterUpdater to work. So your excel should look like this:
elementId
parameters.speckle_type
parameters.WALL_BASE_OFFSET.value
parameters.WALL_BASE_OFFSET.units
parameters.WALL_BASE_OFFSET.speckle_type
speckle_type
1101940
Base
0
mm
Objects.BuiltElements.Revit.Parameter
Objects.BuiltElements.Revit.ParameterUpdater
Make sure the elementId exists in your scene and please let me know if that works!
Regarding the missing ALL_MODEL_INSTANCE_COMMENTS param I’d need to investigate! Any chance you could share a sample project file with a couple of elements?
Sorry, still encountering the same error.
My model has just one wall, the id is the same as in excel (wetransfer link here - https://we.tl/t-a56bZLTNql )
The Comments and Mark parameters started coming through once I’ve introduced a value to them in Revit.
I’ve tried changing the string to some other value in excel, it results in the same error back in Revit - 'Cannot deserialize… ’
Hey @daria_ivnc I did check and actually, you’re right, there is a small bug with some of the latest serialization improvements we introduced recently. Apologies for the time lost!
Good news is that there’s also a workaround! Long story short, we need to let excel think the elementId column is text instead of a number.
You can do so by adding a space in front of the id eg: " 1101940"
Alternatively a fix will be included in the next release (2-3 weeks for a stable, 1 week for a beta).
Doing so I can confirm it should work as expected:
Hey @daria_ivnc , I also got to the bottom of the missing parameters.
That is simply because Speckle is ignoring null values, and if a parameter has never been set in Revit it is null.
If you fill the “Comments” parameter you should then see it in Speckle as well. Please let us know if it’s a deal breaker for you, as a matter of fact we’ve been discussing nulls internally quite intensively in the past