Datasmith not working properly

Hello!
Up until now, datasmith from rhino to twin motion has worked seamlessly.
However, now i only get the following message (project name is Wood.3dm)

Command: DatasmithDirectLinkSync
Exporting to Wood Datasmith scene
Press Esc key to cancel…
An unexpected error has occurred:
System.Exception: Object reference not set to an instance of an object. —> System.NullReferenceException: Object reference not set to an instance of an object.
at DatasmithRhino.Utils.DatasmithRhinoUtilities.SerializeTexture(BinaryWriter Writer, Texture RhinoTexture)
at DatasmithRhino.Utils.DatasmithRhinoUtilities.SerializeMaterial(Material RhinoMaterial)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.AddMaterialIndexMapping(Int32 MaterialIndex)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.AddObjectMaterialReference(RhinoObject InObject, Int32 MaterialIndex)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.RegisterActorsToContext(IEnumerable1 ActorInfos) at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.RecursivelyParseLayerHierarchy(Layer CurrentLayer, DatasmithActorInfo ParentNode) at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseRhinoHierarchy() at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseDocument(Boolean bForceParse) --- End of inner exception stack trace --- at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseDocument(Boolean bForceParse) at DatasmithRhino.DatasmithRhinoSceneExporter.ExportScene(FDatasmithFacadeScene DatasmithScene, DatasmithRhinoExportContext ExportContext, Func2 OnSceneExportCompleted)
94 curves, 18 surfaces, 552 polysurfaces added to selection.
Command: DatasmithDirectLinkConnections
Command: DatasmithDirectLinkSync
Exporting to Wood Datasmith scene
Press Esc key to cancel…
An unexpected error has occurred:
System.Exception: Object reference not set to an instance of an object. —> System.NullReferenceException: Object reference not set to an instance of an object.
at DatasmithRhino.Utils.DatasmithRhinoUtilities.SerializeTexture(BinaryWriter Writer, Texture RhinoTexture)
at DatasmithRhino.Utils.DatasmithRhinoUtilities.SerializeMaterial(Material RhinoMaterial)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.AddMaterialIndexMapping(Int32 MaterialIndex)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.AddObjectMaterialReference(RhinoObject InObject, Int32 MaterialIndex)
at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.RegisterActorsToContext(IEnumerable1 ActorInfos) at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.RecursivelyParseLayerHierarchy(Layer CurrentLayer, DatasmithActorInfo ParentNode) at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseRhinoHierarchy() at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseDocument(Boolean bForceParse) --- End of inner exception stack trace --- at DatasmithRhino.ExportContext.DatasmithRhinoExportContext.ParseDocument(Boolean bForceParse) at DatasmithRhino.DatasmithRhinoSceneExporter.ExportScene(FDatasmithFacadeScene DatasmithScene, DatasmithRhinoExportContext ExportContext, Func2 OnSceneExportCompleted)

Hei Martin -

You might want to look for help from the developer of that plug-in - Twinmotion
-wim

Hi @wim
In the Rhino Version 7 SR31 (7.31.23166.15001, 2023-06-15) the Twinmotion link is working but Rhino just prompted me to install an update. Can you please confirm if the latest Rhino update broke the Twinmotion link or not. I don’t want to install the latest Rhino update if it broke the Twinmotion link.
Thanks,
RM

Hi Roland -

I’m not running that plug-in, so, no, that’s not something that I can confirm. There shouldn’t be any SDK breaking changes between service releases and we encourage 3rd party developers to test their plug-ins on at least the last service release candidate.
That said, 7.32 did break the SDK and a hotfix was release when this was discovered.
-wim

Hi @wim

Thanks for the reply so the latest rhino 7.32 sr has the hot fix in it when I install it?

Just making sure as I can’t afford to break my Rhino link with Twinmotion as I’m doing a lot of work in that program.

Thanks for your quick answer and help,
RM

Hi Roland -

7.32.23221.10241 is the SR 32 Hotfix.
This fixes an issue that prevented VisualARQ from running.

Apart from that, if you have Rhino download and install updates automatically, you will have the previous installer still on disk in your C:\ProgramData\McNeel\McNeelUpdate\DownloadCache folder. Generally, if you rely on being able to revert to a previous version, it might be a good idea to move the exe file out of that folder so that you have something to fall back to.
-wim

Hi @wim
That’s good advice for reverting, I forgot where the downloads was located.
Much obliged for your help and valuable information.
RM

Hi @wim @martinwalbo
I just tested with the 7.32 Rhino service release and the Rhino to Twimmotion link is working for me.
Just wanted to give the heads up.
RM

1 Like