using HStation.RevitDev.Model.AttributeClass; using HStation.RevitDev.Model.ModelEnum; using System; using System.Reflection; namespace HStation.RevitDev.Model.Common { public class ElementTypeMapping { public static ExportType GetExportType(RevitType revitType) { Type type = revitType.GetType(); FieldInfo fieldInfo = type.GetField(revitType.ToString()); var attr = fieldInfo.GetCustomAttribute(); if (attr != null) { return attr.ExportType; } return ExportType.EFT_Unknown; } } }