/***************************************************/ public static bool SetLocation(this Element element, IBHoMObject bHoMObject, RevitSettings settings) { Type type = element.GetType(); if (AbstractRevitTypes.All(x => !x.IsAssignableFrom(type))) { BH.Engine.Reflection.Compute.RecordError(String.Format("Unable to set location of Revit element of type {0} based on BHoM object of type {1} beacuse no suitable method could be found. Only parameters were updated. Revit ElementId: {2} BHoM_Guid: {3}", element.GetType(), bHoMObject.GetType(), element.Id, bHoMObject.BHoM_Guid)); } return(false); }
/***************************************************/ /**** Fallback Methods ****/ /***************************************************/ public static bool SetLocation(this Element element, IGeometry geometry, RevitSettings settings) { Type type = element.GetType(); if (AbstractRevitTypes.All(x => !x.IsAssignableFrom(type))) { BH.Engine.Reflection.Compute.RecordError(String.Format("Setting Revit element location based on BHoM geometry of type {0} is currently not supported. Only parameters were updated. Revit ElementId: {1}", geometry.GetType(), element.Id)); } return(false); }