public HasParameter ( string parameterName ) : bool | ||
parameterName | string | |
return | bool |
public Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements) { IParameterHelper ph = new ParameterHelper(commandData.Application.ActiveUIDocument.Document); var paramName = "SomeParameterThatNormallyDoesnotExist"; var exists = ph.HasParameter(paramName); MessageBox.Show(paramName + " exists: " + exists); paramName = "Project Name"; exists = ph.HasParameter(paramName); MessageBox.Show(paramName + " exists: " + exists); return Result.Succeeded; }
public void ShouldNotHaveParameter_Test() { Document document = Helpers.GeneralHelper.ActiveUIDocument.Document; IParameterHelper parameterHelper = new ParameterHelper(document); Assert.That(parameterHelper.HasParameter("SomeParameterThatNormallyDoesnotExist"), Iz.False); }
public void ShouldHaveParameter_Test() { Document document = Helpers.GeneralHelper.ActiveUIDocument.Document; IParameterHelper parameterHelper = new ParameterHelper(document); Assert.That(parameterHelper.HasParameter("Project Name"), Iz.True); }