diff --git a/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertProjectInfo.cs b/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertProjectInfo.cs index 5ad940652a..4a802f191f 100644 --- a/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertProjectInfo.cs +++ b/Objects/Converters/ConverterRevit/ConverterRevitShared/PartialClasses/ConvertProjectInfo.cs @@ -1,3 +1,6 @@ +using Objects.BuiltElements.Revit; +using Speckle.Core.Models; +using System.Collections.Generic; using DB = Autodesk.Revit.DB; using ProjectInfo = Objects.BuiltElements.Revit.ProjectInfo; @@ -21,6 +24,43 @@ private ProjectInfo ProjectInfoToSpeckle(DB.ProjectInfo revitInfo) status = revitInfo.Status }; Report.Log($"Converted ProjectInfo"); + + Base parameterParent = new(); + GetAllRevitParamsAndIds( + parameterParent, + revitInfo, + new List + { + // parameters included in the strongly typed properties + "PROJECT_ADDRESS", + "PROJECT_AUTHOR", + "PROJECT_BUILDING_NAME", + "CLIENT_NAME", + "PROJECT_ISSUE_DATE", + "PROJECT_NUMBER", + "PROJECT_ORGANIZATION_DESCRIPTION", + "PROJECT_ORGANIZATION_NAME", + "PROJECT_NUMBER", + "PROJECT_STATUS", + // parameters to be excluded entirely + "ELEM_CATEGORY_PARAM_MT", + "ELEM_CATEGORY_PARAM", + "DESIGN_OPTION_ID", + } + ); + + if (parameterParent["parameters"] is Base parameters) + { + Dictionary parameterDict = parameters.GetMembers(DynamicBaseMemberType.Dynamic); + foreach (KeyValuePair kvp in parameterDict) + { + if (kvp.Value is Parameter param && param.value is not null) + { + speckleInfo[param.name] = param.value; + } + } + } + return speckleInfo; } }