예제 #1
0
        private void InitializeUI()
        {
            levels = LevelSelector.FindAndSortLevelNames(doc);
            levelDrop.Items.AddRange(levels);
            levelDrop.SelectedItem = levels.FirstOrDefault();

            doors = DoorSelector.GetDoorTypes(doc);
            doorTypeDropDefault.Items.AddRange(doors);

            doorTypeDropDefault.SelectedIndex = 0;
        }
예제 #2
0
        private void Run()
        {
            List <Autodesk.Revit.DB.Element> doors = DoorSelector.GetDoors(doc, LevelSelector.levelId(doc, level), doorType);

            DoorRenumber renumerator = new DoorRenumber(uidoc, doors, prefix, suffix);

            ISelectionFilter filter = new DoorRenumber.LineSelectionFilter();

            Autodesk.Revit.DB.Reference reference = uidoc.Selection.PickObject(ObjectType.Element, filter, "Select direction curve");

            Autodesk.Revit.DB.Curve curve = (doc.GetElement(reference.ElementId) as Autodesk.Revit.DB.ModelCurve).GeometryCurve;

            renumerator.DoorRenumbering(curve);
        }