Ejemplo n.º 1
0
        public void ByNameNumberTitleBlockAndView_ValidArgs()
        {
            ElementBinder.IsEnabled = false;

            var famSymName = "E1 30x42 Horizontal";
            var famName    = "E1 30 x 42 Horizontal";
            var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName);

            var famTyp  = FamilyType.ByName("Kousa Dogwood - 10'");
            var pt      = Point.ByCoordinates(0, 1, 2);
            var famInst = FamilyInstance.ByPoint(famTyp, pt);

            var view = SectionView.ByBoundingBox(famInst.BoundingBox);

            var sheetName   = "Poodle";
            var sheetNumber = "A1";

            var ele = Sheet.ByNameNumberTitleBlockAndView(sheetName, sheetNumber, titleBlock, view);

            Assert.NotNull(ele);
        }
Ejemplo n.º 2
0
        public void ByNameNumberTitleBlockAndView_BadArgs()
        {
            ElementBinder.IsEnabled = false;

            var famSymName = "E1 30x42 Horizontal";
            var famName    = "E1 30 x 42 Horizontal";
            var titleBlock = FamilyType.ByFamilyAndName(Family.ByName(famName), famSymName);

            var famTyp  = FamilyType.ByName("Kousa Dogwood - 10'");
            var pt      = Point.ByCoordinates(0, 1, 2);
            var famInst = FamilyInstance.ByPoint(famTyp, pt);

            var view = SectionView.ByBoundingBox(famInst.BoundingBox);

            var sheetName   = "Poodle";
            var sheetNumber = "A1";

            Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndView(null, sheetNumber, titleBlock, view));
            Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndView(sheetName, null, titleBlock, view));
            Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndView(sheetName, sheetNumber, null, view));
            Assert.Throws(typeof(ArgumentNullException), () => Sheet.ByNameNumberTitleBlockAndView(sheetName, sheetNumber, titleBlock, null));
        }