Hello everyone, I’m not sure if this is the correct place for posting this, but i wanted to give som feedback on the Import File functionality. Or potentially get some help if the issue is a user error.
I have been experimenting with uploading IFC files using the “Import File” alpha feature. The upload seems to work, and i can wiew the commit, however when i try to receive it in Unity i get an error message:
ArgumentNullException: Value cannot be null.
Parameter name: key
I have since tried to open the IFC file in Revit, and send the model from there. That seemed to solve the issue. However i would prefer uploading the file directly to Speckle, to minimize the number of required applications required to use the tool i am developing.
The aim of posting this is to eigther get a soloutin or explenation of the problem if anyone else has experience. If not i hope the feedback could aid in further developing the “Import File” feature. I’ll add the full error message here:
ArgumentNullException: Value cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <1c8569827291471e9db0dcd976e97952>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <1c8569827291471e9db0dcd976e97952>:0)
Speckle.ConnectorUnity.NativeCache.MemoryNativeCache.TryGetObject (Speckle.Core.Models.Base speckleObject, System.Collections.Generic.List`1[UnityEngine.Object]& nativeObject) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/NativeCache/MemoryNativeCache.cs:31)
Speckle.ConnectorUnity.NativeCache.MemoryNativeCache.TryGetObject[T] (Speckle.Core.Models.Base speckleObject, T& nativeObject) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/NativeCache/MemoryNativeCache.cs:19)
Speckle.ConnectorUnity.NativeCache.AggregateNativeCache.TryGetObject[T] (Speckle.Core.Models.Base speckleObject, T& nativeObject) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/NativeCache/AggregateNativeCache.cs:18)
Objects.Converter.Unity.ConverterUnity.RenderMaterialToNative (Objects.Other.RenderMaterial renderMaterial) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.Mesh.cs:477)
Objects.Converter.Unity.ConverterUnity.<RenderMaterialsToNative>b__74_0 (Objects.Geometry.Mesh m) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.Mesh.cs:456)
System.Linq.Enumerable+SelectListIterator`2[TSource,TResult].ToArray () (at <39d6421ea91449339eee7ef41a176a38>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <39d6421ea91449339eee7ef41a176a38>:0)
Objects.Converter.Unity.ConverterUnity.RenderMaterialsToNative (System.Collections.Generic.IEnumerable`1[T] meshes) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.Mesh.cs:456)
Objects.Converter.Unity.ConverterUnity.MeshesToNative (Speckle.Core.Models.Base element, System.Collections.Generic.IReadOnlyCollection`1[T] meshes) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.Mesh.cs:220)
Objects.Converter.Unity.ConverterUnity.DisplayValueToNative (Speckle.Core.Models.Base object) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.cs:144)
Objects.Converter.Unity.ConverterUnity.ConvertToNativeGameObject (Speckle.Core.Models.Base speckleObject) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.cs:119)
Objects.Converter.Unity.ConverterUnity.ConvertToNative (Speckle.Core.Models.Base object) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Converter/Unity/ConverterUnity.cs:49)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecurseTreeToNative (Speckle.Core.Models.Base baseObject, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:118)
Speckle.ConnectorUnity.Components.RecursiveConverter.ConvertChild (System.Object value, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:165)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecurseTreeToNative (Speckle.Core.Models.Base baseObject, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:148)
Speckle.ConnectorUnity.Components.RecursiveConverter.ConvertChild (System.Object value, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:165)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecurseTreeToNative (Speckle.Core.Models.Base baseObject, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:148)
Speckle.ConnectorUnity.Components.RecursiveConverter.ConvertChild (System.Object value, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:165)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecurseTreeToNative (Speckle.Core.Models.Base baseObject, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:148)
Speckle.ConnectorUnity.Components.RecursiveConverter.ConvertChild (System.Object value, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:165)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecurseTreeToNative (Speckle.Core.Models.Base baseObject, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:148)
Speckle.ConnectorUnity.Components.RecursiveConverter.ConvertChild (System.Object value, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate, System.Collections.Generic.IList`1[T] outCreatedObjects) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:165)
Speckle.ConnectorUnity.Components.RecursiveConverter.RecursivelyConvertToNative (System.Object o, UnityEngine.Transform parent, System.Func`2[T,TResult] predicate) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/RecursiveConverter.ToNative.cs:90)
Speckle.ConnectorUnity.Components.SpeckleReceiver.ConvertToNativeWithCategories (Speckle.Core.Models.Base base, System.String rootObjectName, System.Action`1[T] beforeConvertCallback) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Runtime/Components/SpeckleReceiver.cs:199)
Speckle.ConnectorUnity.Components.Editor.SpeckleReceiverEditor.Convert (Speckle.ConnectorUnity.Components.SpeckleReceiver receiver, Speckle.Core.Models.Base commitObject, System.String name) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Editor/Components/SpeckleReceiverEditor.cs:120)
Speckle.ConnectorUnity.Components.Editor.SpeckleReceiverEditor.ReceiveAndConvert (Speckle.ConnectorUnity.Components.SpeckleReceiver speckleReceiver) (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Editor/Components/SpeckleReceiverEditor.cs:99)
Speckle.ConnectorUnity.Components.Editor.SpeckleReceiverEditor.OnInspectorGUI () (at Library/PackageCache/systems.speckle.speckle-unity@59221e89ba/Editor/Components/SpeckleReceiverEditor.cs:76)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <1c8569827291471e9db0dcd976e97952>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)