private void SetParameterValue(Autodesk.Revit.DB.Parameter param, SIUnit value) { if(param.StorageType != StorageType.Double) throw new Exception("The parameter's storage type is not an integer."); param.Set(value.ConvertToHostUnits()); }
private void SetParameterValue(Autodesk.Revit.DB.Parameter param, bool value) { if (param.StorageType != StorageType.Integer) throw new Exception("The parameter's storage type is not an integer."); param.Set(value == false ? 0 : 1); }
private void SetParameterValue(Autodesk.Revit.DB.Parameter param, string value) { if (param.StorageType != StorageType.String) throw new Exception("The parameter's storage type is not a string."); param.Set(value); }
private void SetParameterValue(Autodesk.Revit.DB.Parameter param, int value) { if (param.StorageType != StorageType.Integer && param.StorageType != StorageType.Double) throw new Exception("The parameter's storage type is not a number."); param.Set(value); }
private void SetParameterValue(Autodesk.Revit.DB.Parameter param, Revit.Elements.Element value) { if (param.StorageType != StorageType.ElementId) throw new Exception("The parameter's storage type is not an Element."); param.Set(value.InternalElementId); }
private void SetParameterValue(Autodesk.Revit.DB.Parameter param, string value) { param.Set(value); }