Example #1
0
        public void DrawTest()
        {
            var doc = RevitTestExecutive.CommandData.Application.ActiveUIDocument.Document;
            FilteredElementCollector fec;
            StadiumSeatingTier       los = new StadiumSeatingTier(doc);

            los.Draw();
            fec = new FilteredElementCollector(doc, los.View.Id).OfClass(typeof(CurveElement));
            Assert.IsTrue(fec.ToElements().Count > 0);
        }
Example #2
0
        public void CreateLineOfSightDraftingViewTest()
        {
            ViewDrafting view = null;
            var          doc  = RevitTestExecutive.CommandData.Application.ActiveUIDocument.Document;

            using (var t = new Transaction(doc)) {
                if (t.Start("CreateLineOfSightDraftingViewTest") == TransactionStatus.Started)
                {
                    StadiumSeatingTier los = new StadiumSeatingTier(doc);
                    view = los.CreateLineOfSightDraftingView("LOS test view 01");
                    if (t.Commit() != TransactionStatus.Committed)
                    {
                        t.RollBack();
                    }
                }
                else
                {
                    throw new Exception("Transaction could not be started.");
                }
            }
            Assert.NotNull(view);
        }
 public LineOfSightViewModel(Document doc)
 {
     lineOfSight = new StadiumSeatingTier(doc);
 }