Inheritance: IParameterHelper
Beispiel #1
0
        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;
        }
Beispiel #2
0
 public void ShouldNotHaveParameter_Test()
 {
     Document document = Helpers.GeneralHelper.ActiveUIDocument.Document;
     IParameterHelper parameterHelper = new ParameterHelper(document);
     Assert.That(parameterHelper.HasParameter("SomeParameterThatNormallyDoesnotExist"), Iz.False);
 }
Beispiel #3
0
 public void ShouldHaveParameter_Test()
 {
     Document document = Helpers.GeneralHelper.ActiveUIDocument.Document;
     IParameterHelper parameterHelper = new ParameterHelper(document);
     Assert.That(parameterHelper.HasParameter("Project Name"), Iz.True);
 }