private void SetRevitValue() { //What could go wrong? //1. The Value is already set and we go into circular reference - that should be resolved in the Revit value (skip if we are == value) //2. The UIValue is already set and we go into circular reference ... Value = Utils.GetDutValueTo(StorageType, DisplayUnitType, RevitValue); UIValue = ValueConvertUtils.StringFromDoubleConvert(DisplayUnitType, Precision, Value); if (!_suppres) { RequestHandling.MakeRequest(RequestId.ChangeParam, new Tuple <string, double>(Name, RevitValue)); // Suppres request in case of Shuffle, or mass request (can only make 1 single bulk request at a time) } else { _suppres = false; } }
//Makes a TypeToInstance request to Toggle between the two private void TypeToInstance(object sender) { TypeOrInstance = TypeOrInstance.Equals("Instance") ? "Type" : "Instance"; RequestHandling.MakeRequest(RequestId.TypeToInstance, Name, Type); }
//Makes a Delete Request to Delete the Parameter private void Delete(object sender) { RequestHandling.MakeRequest(RequestId.DeleteId, Name); }
//Changes the Name of the Parameter private void ChangeName() { RequestHandling.MakeRequest(RequestId.ChangeParamName, new Tuple <string, string>(OldName, Name)); }