public static bool IsValidElement(DB.Element element) { if (element is DB.ElementType) { return(false); } if (element is DB.View) { return(false); } if (element.Location is object) { return(true); } return ( element is DB.DirectShape || element is DB.CurveElement || element is DB.CombinableElement || element is DB.Architecture.TopographySurface || element is DB.Opening || (element.Category is object && element.CanHaveTypeAssigned()) ); }
public static new bool IsValidElement(DB.Element element) { if (element.Category is null) { return(false); } return(element.CanHaveTypeAssigned()); }
public static bool IsValidElement(DB.Element element) { return ( element is DB.DirectShape || element is DB.CurveElement || element is DB.CombinableElement || element is DB.Architecture.TopographySurface || (element.Category is object && element.CanHaveTypeAssigned()) ); }
public static new bool IsValidElement(DB.Element element) { if (element is DB.ElementType) { return(false); } if (element is DB.View) { return(false); } return(element.Category is object && element.CanHaveTypeAssigned()); }
private void AddElementParams(Element e) { foreach (Parameter p in e.Parameters) { if (!(p.StorageType == StorageType.None)) { AddDropDownItem(p); } } // if element can have type assigned it's safe to assume that it's an instance // and add type parameters to the list if (e.CanHaveTypeAssigned()) { Autodesk.Revit.DB.ElementType et = DocumentManager.Instance.CurrentDBDocument.GetElement(e.GetTypeId()) as Autodesk.Revit.DB.ElementType; if (et != null) { AddTypeParams(et); } } }