예제 #1
0
        private static string AsElementName(Document doc, ElementId idVal)
        {
            if (idVal.Compare(ElementId.InvalidElementId) == 0)
            {
                return(Convert.ToString(idVal.IntegerValue));
            }
            var ele = ElementFilterUtils.GetElement(doc, idVal);

            if (ele == null)
            {
                return(null);
            }
            return(ele.Name);
        }