Beispiel #1
0
        private void CreateRebarRibbon(UIControlledApplication uiApp, string tabName)
        {
            RibbonPanel panel = uiApp.CreateRibbonPanel(tabName, "Армирование");
            SplitButton areaRebarSplitButton = panel
                                               .AddItem(new SplitButtonData("AreaRebarSplitButton", "Фоновое"))
                                               as SplitButton;

            areaRebarSplitButton.AddPushButton(CreateButtonData("RevitAreaReinforcement", "CommandCreateAreaRebar"));
            areaRebarSplitButton.AddPushButton(CreateButtonData("RevitAreaReinforcement", "CommandCreateFloorRebar"));
            areaRebarSplitButton.AddSeparator();
            areaRebarSplitButton.AddPushButton(CreateButtonData("RevitAreaReinforcement", "CommandRestoreRebarArea"));

            panel.AddSeparator();

            panel.AddItem(CreateButtonData("RebarVisibility", "Command"));

            PushButtonData dataAreaMark      = CreateButtonData("AreaRebarMark", "CommandManualStart");
            PushButtonData dataHideRebars    = CreateButtonData("RebarPresentation", "Command");
            PushButtonData dataExplodeRebars = CreateButtonData("ExplodeRebarSet", "CommandExplode");

            panel.AddStackedItems(dataAreaMark, dataHideRebars, dataExplodeRebars);
        }
Beispiel #2
0
        private void CreateModelingRibbon(UIControlledApplication uiApp, string tabName)
        {
            RibbonPanel panel = uiApp.CreateRibbonPanel(tabName, "Моделирование");

            SplitButton splitHolesElev = panel
                                         .AddItem(new SplitButtonData("HolesElevSplitButton", "Отверстия"))
                                         as SplitButton;
            PushButtonData pbdElevations = CreateButtonData("RevitElementsElevation", "Command");

            pbdElevations.Text = "Определить\nотметки";
            splitHolesElev.AddPushButton(pbdElevations);

            splitHolesElev.AddSeparator();
            PushButtonData pbdHolesSettings = CreateButtonData("RevitElementsElevation", "CommandConfig");

            splitHolesElev.AddPushButton(pbdHolesSettings);

            PushButtonData pbdPropertiesCopy = CreateButtonData("PropertiesCopy", "CommandPropertiesCopy");

            pbdPropertiesCopy.Text = "Супер-\nкисточка";
            panel.AddItem(pbdPropertiesCopy);

            PushButtonData pbdGroupedAssembly = CreateButtonData("GroupedAssembly", "CommandSuperAssembly");

            pbdGroupedAssembly.Text = "Сборка-\nгруппа";
            panel.AddItem(pbdGroupedAssembly);

            //PushButtonData pbd = CreateButtonData("", "");

            SplitButton splitJoin = panel
                                    .AddItem(new SplitButtonData("JoingeometrySplitButton", "Геометрия"))
                                    as SplitButton;

            PushButtonData pbdAutoJoin = CreateButtonData("AutoJoin", "CommandAutoJoin");

            pbdAutoJoin.Text = "Авто\nсоединение";
            splitJoin.AddPushButton(pbdAutoJoin);

            PushButtonData pbdJoinByOrder = CreateButtonData("AutoJoin", "CommandJoinByOrder");

            pbdJoinByOrder.Text = "Задать\nприоритет";
            splitJoin.AddPushButton(pbdJoinByOrder);

            PushButtonData pbdAutoUnjoin = CreateButtonData("AutoJoin", "CommandBatchUnjoin");

            pbdAutoUnjoin.Text = "Авто\nразделение";
            splitJoin.AddPushButton(pbdAutoUnjoin);

            PushButtonData pbdAutoCut = CreateButtonData("AutoJoin", "CommandAutoCut");

            pbdAutoCut.Text = "Авто\nвырезание";
            splitJoin.AddPushButton(pbdAutoCut);
            splitJoin.AddPushButton(CreateButtonData("AutoJoin", "CommandCreateCope"));


            PushButtonData     pbdHost  = CreateButtonData("PropertiesCopy", "CommandSelectHost");
            SplitButtonData    sbdPiles = new SplitButtonData("Piles", "Сваи");
            IList <RibbonItem> stacked1 = panel.AddStackedItems(pbdHost, sbdPiles);

            SplitButton splitPiles = stacked1[1] as SplitButton;

            splitPiles.AddPushButton(CreateButtonData("PilesCoords", "PilesNumberingCommand"));
            splitPiles.AddPushButton(CreateButtonData("PilesCoords", "PileCutCommand"));
            splitPiles.AddPushButton(CreateButtonData("PilesCoords", "PilesElevationCommand"));
            splitPiles.AddPushButton(CreateButtonData("PilesCoords", "PilesCalculateRangeCommand"));
            splitPiles.AddSeparator();
            splitPiles.AddPushButton(CreateButtonData("PilesCoords", "SettingsCommand"));
        }