diff --git a/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/ArcGISFieldUtils.cs b/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/ArcGISFieldUtils.cs index d26b75686..af9e0e55b 100644 --- a/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/ArcGISFieldUtils.cs +++ b/Converters/ArcGIS/Speckle.Converters.ArcGIS3/Utils/ArcGISFieldUtils.cs @@ -194,39 +194,44 @@ List fieldAdded else if (field.Value is Dictionary attributeDict) { // only traverse Base if it's Rhino userStrings, or Revit parameter, or Base containing Revit parameters - if (field.Key == "properties") + //if (field.Key == "properties") + //{ + foreach (KeyValuePair attributField in attributeDict) { - foreach (KeyValuePair attributField in attributeDict) + if ( + attributField.Value is Dictionary + || attributField.Key == "applicationId" + || attributField.Key == "id" + ) { - if ( - attributField.Value is Dictionary - || attributField.Key == "applicationId" - || attributField.Key == "id" - ) - { - KeyValuePair newAttributField = - new($"{field.Key}.{attributField.Key}", attributField.Value); - Func functionAdded = x => (function(x) as KeyValuePair?)?.Value; - TraverseAttributes(newAttributField, functionAdded, fieldsAndFunctions, fieldAdded); - } - - if (attributField.Value is IList attributeDictList) + KeyValuePair newAttributField = new($"{field.Key}.{attributField.Key}", attributField.Value); + Func functionAdded = x => (function(x) as Dictionary)?[attributField.Key]; + TraverseAttributes(newAttributField, functionAdded, fieldsAndFunctions, fieldAdded); + } + else if (attributField.Value is IList attributeDictList) + { + int count = 0; + foreach (var attributeDictField in attributeDictList) { - int count = 0; - foreach (var attributeDictField in attributeDictList) - { - KeyValuePair newAttributeField = new($"{field.Key}[{count}]", attributeDictField); - Func functionAdded = x => (function(x) as List)?[count]; - TraverseAttributes(newAttributeField, functionAdded, fieldsAndFunctions, fieldAdded); - count += 1; - } + KeyValuePair newAttributeField = new($"{field.Key}[{count}]", attributeDictField); + Func functionAdded = x => (function(x) as List)?[count]; + TraverseAttributes(newAttributeField, functionAdded, fieldsAndFunctions, fieldAdded); + count += 1; } } + else + { + KeyValuePair newAttributeField = + new($"{field.Key}.{attributField.Key}", attributField.Value); + Func functionAdded = x => (function(x) as Dictionary)?[attributField.Key]; + TryAddField(newAttributeField, functionAdded, fieldsAndFunctions, fieldAdded); + } } - else - { - // for now, ignore all other properties of Dictionnary type - } + //} + //else + //{ + // for now, ignore all other properties of Dictionnary type + //} } else if (field.Value is IList attributeList) {