Exemplo n.º 1
0
        public void ByLevel_ValidArgs()
        {
            var elevation = 100;
            var level     = Level.ByElevation(elevation);

            Assert.NotNull(level);

            var view = CeilingPlanView.ByLevel(level);

            Assert.NotNull(view);
        }
Exemplo n.º 2
0
 public static Element Wrap(Autodesk.Revit.DB.ViewPlan view, bool isRevitOwned)
 {
     if (view.ViewType == ViewType.CeilingPlan)
     {
         return(CeilingPlanView.FromExisting(view, isRevitOwned));
     }
     else if (view.ViewType == ViewType.FloorPlan)
     {
         return(FloorPlanView.FromExisting(view, isRevitOwned));
     }
     else
     {
         // unknown type of plan view, just wrap as unknown
         return(UnknownElement.FromExisting(view));
     }
 }
Exemplo n.º 3
0
        public static Element Wrap(Autodesk.Revit.DB.ViewPlan view, bool isRevitOwned)
        {
            switch (view.ViewType)
            {
            case ViewType.CeilingPlan:
                return(CeilingPlanView.FromExisting(view, isRevitOwned));

            case ViewType.FloorPlan:
                return(FloorPlanView.FromExisting(view, isRevitOwned));

            case ViewType.EngineeringPlan:
                return(StructuralPlanView.FromExisting(view, isRevitOwned));

            default:
                return(UnknownElement.FromExisting(view, true));
            }
        }
Exemplo n.º 4
0
 public void ByLevel_BadArgs()
 {
     Assert.Throws(typeof(ArgumentNullException), () => CeilingPlanView.ByLevel(null));
 }