public static bool ScanElementHasMappingDataGroupProps( BCOM.Element comElement, out IEnumerable <TagToDataGroupMapProperty> mapProperties) { var listProps = new List <TagToDataGroupMapProperty>(); foreach (TagToDataGroupMapProperty item in TagsToDataGroupMapping.Instance.Items) { object dgValue = comElement.GetDataGroupPropertyValue( item.DataGroupXPath, item.DataGroupCatalogType); if (dgValue != null) { item.Value = dgValue; listProps.Add(item); } } mapProperties = listProps.Count != 0 ? listProps : null; return(listProps.Count != 0); }