Exemple #1
0
        /// <summary>
        /// Create new Stacked items at the panel
        /// </summary>
        /// <param name="action">Action where you must add items to the stacked panel</param>
        /// <returns>Panel where stacked items were created</returns>
        public CustomPanel CreateStackedItems(Action <CustomStackedItem> action)
        {
            if (action is null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var stackedItem = new CustomStackedItem(this);

            action.Invoke(stackedItem);

            if (stackedItem.ItemsCount < 2 ||
                stackedItem.ItemsCount > 3)
            {
                throw new InvalidOperationException("You must create 2 or three items in the StackedItems");
            }

            var item1 = stackedItem.Items[0].GetButtonData();
            var item2 = stackedItem.Items[1].GetButtonData();

            if (stackedItem.ItemsCount == 3)
            {
                var item3 =
                    stackedItem.Items[2].GetButtonData();
                try { _panel.AddStackedItems(item1, item2, item3); }
                catch { }
            }
            else
            {
                try { _panel.AddStackedItems(item1, item2); }
                catch { }
            }

            return(this);
        }
Exemple #2
0
        public static void AddItems(Autodesk.Revit.UI.RibbonPanel panelToUse, string[] dynPaths, bool forceLargeIcon = false)
        {
            var totalFiles = dynPaths.Length;

            List <PushButtonData> pushButtonDatas = new List <PushButtonData>();

            foreach (var file in dynPaths)
            {
                FileInfo       fInfo         = new FileInfo(file);
                string         buttonName    = $"relay{fInfo.Name.Replace(" ", "")}";
                PushButtonData newButtonData = new PushButtonData(buttonName,
                                                                  fInfo.Name.GenerateButtonText(),
                                                                  Path.Combine(Globals.ExecutingPath, "Relay.dll"), "Relay.Run")
                {
                    ToolTip = fInfo.FullName
                };

                //set the images, if there are none, use default
                string icon32 = fInfo.FullName.Replace(".dyn", "_32.png");
                newButtonData.LargeImage = File.Exists(icon32)
                    ? new BitmapImage(new Uri(icon32))
                    : new BitmapImage(new Uri(Path.Combine(Globals.RelayGraphs, "Dynamo_32.png")));

                string icon16 = fInfo.FullName.Replace(".dyn", "_16.png");
                newButtonData.Image = File.Exists(icon16)
                    ? new BitmapImage(new Uri(icon16))
                    : new BitmapImage(new Uri(Path.Combine(Globals.RelayGraphs, "Dynamo_16.png")));

                pushButtonDatas.Add(newButtonData);
            }

            if (forceLargeIcon)
            {
                foreach (var pushButton in pushButtonDatas)
                {
                    panelToUse.AddItem(pushButton);
                }
                return;
            }

            var splitButtons = SplitList(pushButtonDatas, 2);

            foreach (var buttonGroup in splitButtons)
            {
                switch (buttonGroup.Count)
                {
                case 2:
                    panelToUse.AddStackedItems(buttonGroup[0], buttonGroup[1]);
                    break;

                case 1:
                    panelToUse.AddItem(buttonGroup[0]);
                    break;
                }
            }
        }
Exemple #3
0
        //The maxi button of stackedItem accepted is 3
        public CustomPanel CreateStackedItems(Action <CustomStackedItem> action)
        {
            if (action is null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var stackedItem = new CustomStackedItem(this);

            action.Invoke(stackedItem);

            if (stackedItem.ItemsCount < 2 ||
                stackedItem.ItemsCount > 3)
            {
                throw new InvalidOperationException("You must create 2 or three items in the StackedItems");
            }

            var item1 = stackedItem.Items[0].GetItemData();
            var item2 = stackedItem.Items[1].GetItemData();
            IList <RibbonItem> ribbonItems;

            if (stackedItem.ItemsCount == 3)
            {
                RibbonItemData item3 = stackedItem.Items[2].GetItemData();
                ribbonItems = _panel.AddStackedItems(item1, item2, item3);
            }
            else
            {
                ribbonItems = _panel.AddStackedItems(item1, item2);
            }

            for (var i = 0; i < stackedItem.Items.Count; ++i)
            {
                stackedItem.Items[i].DoPostProcessing(ribbonItems[i]);//?
            }
            return(this);
        }
Exemple #4
0
        // <summary>
        // Adds a set of PushbuttonData to the ribbon on a specified panel as stacked and/or buttons
        // </summary>
        // <param name = "tabname" ></ param >
        // <param name = "panelName" ></ param >
        // <param name = "buttons" ></ param >
        // <remarks></remarks>
        private void AddAsStackedAndButtons(string tabname, string panelName, Dictionary <string, List <PushButtonData> > buttons)//, buttons As Dictionary(Of String, List(Of PushButtonData))
        {
            Autodesk.Revit.UI.RibbonPanel m_panelSubsc = GetRibbonPanelByTabName(tabname, panelName);
            int m_iCnt = 0;

            foreach (var kvp in buttons)
            {
                if (kvp.Value.Count > 0)
                {
                    if (m_iCnt > 0)
                    {
                        m_panelSubsc.AddSeparator();
                        m_iCnt += 1;
                    }

                    switch (kvp.Value.Count)
                    {
                    case 12:
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        m_panelSubsc.AddStackedItems(kvp.Value[3], kvp.Value[4], kvp.Value[5]);
                        m_panelSubsc.AddStackedItems(kvp.Value[6], kvp.Value[7], kvp.Value[8]);
                        m_panelSubsc.AddStackedItems(kvp.Value[9], kvp.Value[10], kvp.Value[11]);
                        break;

                    case 11:
                        m_panelSubsc.AddStackedItems(kvp.Value[9], kvp.Value[10]);
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        m_panelSubsc.AddStackedItems(kvp.Value[3], kvp.Value[4], kvp.Value[5]);
                        m_panelSubsc.AddStackedItems(kvp.Value[6], kvp.Value[7], kvp.Value[8]);
                        break;

                    case 10:
                        m_panelSubsc.AddItem(kvp.Value[9]);
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        m_panelSubsc.AddStackedItems(kvp.Value[3], kvp.Value[4], kvp.Value[5]);
                        m_panelSubsc.AddStackedItems(kvp.Value[6], kvp.Value[7], kvp.Value[8]);
                        break;

                    case 9:
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        m_panelSubsc.AddStackedItems(kvp.Value[3], kvp.Value[4], kvp.Value[5]);
                        m_panelSubsc.AddStackedItems(kvp.Value[6], kvp.Value[7], kvp.Value[8]);
                        break;

                    case 8:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        m_panelSubsc.AddItem(kvp.Value[1]);
                        m_panelSubsc.AddStackedItems(kvp.Value[2], kvp.Value[3], kvp.Value[4]);
                        m_panelSubsc.AddStackedItems(kvp.Value[5], kvp.Value[6], kvp.Value[7]);
                        break;

                    case 7:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        m_panelSubsc.AddStackedItems(kvp.Value[1], kvp.Value[2], kvp.Value[3]);
                        m_panelSubsc.AddStackedItems(kvp.Value[4], kvp.Value[5], kvp.Value[6]);
                        break;

                    case 6:
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        m_panelSubsc.AddStackedItems(kvp.Value[3], kvp.Value[4], kvp.Value[5]);
                        break;

                    case 5:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        m_panelSubsc.AddItem(kvp.Value[1]);
                        m_panelSubsc.AddStackedItems(kvp.Value[2], kvp.Value[3], kvp.Value[4]);
                        break;

                    case 4:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        m_panelSubsc.AddStackedItems(kvp.Value[1], kvp.Value[2], kvp.Value[3]);
                        break;

                    case 3:
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1], kvp.Value[2]);
                        break;

                    case 2:
                        m_panelSubsc.AddStackedItems(kvp.Value[0], kvp.Value[1]);
                        break;

                    case 1:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        break;

                    default:
                        m_panelSubsc.AddItem(kvp.Value[0]);
                        break;
                    }
                }
            }
        }
Exemple #5
0
        public static void Toolbar(UIControlledApplication application)
        {
            // Create tab
            string tabName = "BIMicon";

            application.CreateRibbonTab(tabName);

            // Create ribbon
            Autodesk.Revit.UI.RibbonPanel panelLibrary   = application.CreateRibbonPanel(tabName, "Library");
            Autodesk.Revit.UI.RibbonPanel panelModelling = application.CreateRibbonPanel(tabName, "Modelling");
            Autodesk.Revit.UI.RibbonPanel panelProject   = application.CreateRibbonPanel(tabName, "Project");
            Autodesk.Revit.UI.RibbonPanel panelSchedules = application.CreateRibbonPanel(tabName, "Schedules");
            Autodesk.Revit.UI.RibbonPanel panelSheets    = application.CreateRibbonPanel(tabName, "Sheets");
            Autodesk.Revit.UI.RibbonPanel panelSupport   = application.CreateRibbonPanel(tabName, "Support");

            // Retrieve assembly path
            string assemblyPath = Assembly.GetExecutingAssembly().Location;

            // Help url for BIMicon items in the ribbon
            string         urlHelp        = @"https://www.bimicon.com/bimicon-plugin/";
            ContextualHelp contextHelpUrl = new ContextualHelp(ContextualHelpType.Url, urlHelp);

            /*---Ribbon Panel Library---*/
            #region Ribbon Panel Library
            // Duplicate sheets
            PushButtonData buttonRemoveBackups = new PushButtonData(
                "RemoveBackups",
                "Remove\nBackups",
                assemblyPath,
                "BIMiconToolbar.RemoveBackups.RemoveBackups"
                );

            PushButton pbRemoveBackups = panelLibrary.AddItem(buttonRemoveBackups) as PushButton;
            pbRemoveBackups.LargeImage            = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/RemoveBackups/Images/iconRemoveBackup.png"));
            pbRemoveBackups.Image                 = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/RemoveBackups/Images/iconRemoveBackupSmall.png"));
            pbRemoveBackups.ToolTip               = "Remove Revit backup files.";
            pbRemoveBackups.LongDescription       = "Remove Revit backup files from selected folder including subfolders.";
            pbRemoveBackups.AvailabilityClassName = "BIMiconToolbar.Tab.CommandAvailability";
            // Set the context help when F1 pressed
            pbRemoveBackups.SetContextualHelp(contextHelpUrl);

            // File Rename
            PushButtonData buttonFilesRename = new PushButtonData(
                "FilesRename",
                "Rename\nFiles",
                assemblyPath,
                "BIMiconToolbar.FilesRename.FilesRename"
                );

            PushButton pbFilesRename = panelLibrary.AddItem(buttonFilesRename) as PushButton;
            pbFilesRename.LargeImage            = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FilesRename/Images/iconFilesRename.png"));
            pbFilesRename.Image                 = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FilesRename/Images/iconFilesRenameSmall.png"));
            pbFilesRename.ToolTip               = "Rename the files inside a folder.";
            pbFilesRename.LongDescription       = "Rename all files of a certain type inside a folder.";
            pbFilesRename.AvailabilityClassName = "BIMiconToolbar.Tab.CommandAvailability";
            // Set the context help when F1 pressed
            pbFilesRename.SetContextualHelp(contextHelpUrl);

            // Family Browser
            PushButtonData buttonFamilyBrowser = new PushButtonData(
                "FamilyBrowser",
                "Family\nBrowser",
                assemblyPath,
                "BIMiconToolbar.FamilyBrowser.FamilyBrowser"
                );

            PushButton pbFamilyBrowser = panelLibrary.AddItem(buttonFamilyBrowser) as PushButton;
            pbFamilyBrowser.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FamilyBrowser/Images/iconFamilyBrowser.png"));
            pbFamilyBrowser.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FamilyBrowser/Images/iconFamilyBrowserSmall.png"));
            pbFamilyBrowser.ToolTip         = "Open a dockable panel to search and load families.";
            pbFamilyBrowser.LongDescription = "Open a dockable panel that allows searching and browsing families.";

            // Set the context help when F1 pressed
            pbFamilyBrowser.SetContextualHelp(contextHelpUrl);

            #endregion

            /*---Ribbon Panel Library---*/
            #region Ribbon Panel Modelling
            // Duplicate sheets
            PushButtonData buttonFloorFinish = new PushButtonData(
                "Floor Finish",
                "Floor\nFinish",
                assemblyPath,
                "BIMiconToolbar.FloorFinish.FloorFinish"
                );

            PushButton pbFloorFinish = panelModelling.AddItem(buttonFloorFinish) as PushButton;
            pbFloorFinish.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FloorFinish/Images/iconFloorFinish.png"));
            pbFloorFinish.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/FloorFinish/Images/iconFloorFinishSmall.png"));
            pbFloorFinish.ToolTip         = "Create floor finishes by selecting rooms.";
            pbFloorFinish.LongDescription = "Create floor finishes by selecting rooms and floor type.";
            // Set the context help when F1 pressed
            pbFloorFinish.SetContextualHelp(contextHelpUrl);

            #endregion

            /*---Ribbon Panel Schedules---*/
            #region Ribbon Panel Schedules

            // Export Schedules
            PushButtonData buttonExportSchedules = new PushButtonData(
                "ExportSchedules",
                "Export\nSchedules",
                assemblyPath,
                "BIMiconToolbar.ExportSchedules.ExportSchedules"
                );

            PushButton pbExportSchedules = panelSchedules.AddItem(buttonExportSchedules) as PushButton;
            pbExportSchedules.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/ExportSchedules/Images/iconSchedulesExcel.png"));
            pbExportSchedules.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/ExportSchedules/Images/iconSchedulesExcelSmall.png"));
            pbExportSchedules.ToolTip         = "Export selected schedules.";
            pbExportSchedules.LongDescription = "Export selected schedules to the selected destination.";

            // Set the context help when F1 pressed
            pbExportSchedules.SetContextualHelp(contextHelpUrl);

            // Warnings Review
            PushButtonData buttonWarningsReport = new PushButtonData(
                "WarningsReport",
                "Warnings\nReport",
                assemblyPath,
                "BIMiconToolbar.WarningsReport.WarningsReport"
                );

            PushButton pbWarningsReport = panelSchedules.AddItem(buttonWarningsReport) as PushButton;
            pbWarningsReport.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/WarningsReport/Images/iconWarningsReview.png"));
            pbWarningsReport.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/WarningsReport/Images/iconWarningsReviewSmall.png"));
            pbWarningsReport.ToolTip         = "Generate Warnings report.";
            pbWarningsReport.LongDescription = "Exports a Warnings report classified by priority.";

            // Set the context help when F1 pressed
            pbWarningsReport.SetContextualHelp(contextHelpUrl);

            #endregion

            /*---Ribbon Panel Sheets---*/
            #region Ribbon Panel Sheets

            // Duplicate sheets
            PushButtonData buttonDuplicateSheets = new PushButtonData(
                "DuplicateSheets",
                "Duplicate\nSheets",
                assemblyPath,
                "BIMiconToolbar.DuplicateSheets.DuplicateSheets"
                );

            PushButton pbDuplicateSheets = panelSheets.AddItem(buttonDuplicateSheets) as PushButton;
            pbDuplicateSheets.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/DuplicateSheets/Images/iconDupSheets.png"));
            pbDuplicateSheets.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/DuplicateSheets/Images/iconDupSheetsSmall.png"));
            pbDuplicateSheets.ToolTip         = "Duplicate active sheet.";
            pbDuplicateSheets.LongDescription = "Duplicate current active sheet with detailing and annotation elements.";

            // Set the context help when F1 pressed
            pbDuplicateSheets.SetContextualHelp(contextHelpUrl);

            // View on Sheet
            PushButtonData buttonViewOnSheet = new PushButtonData(
                "ViewOnSheet",
                "View on\nSheet",
                assemblyPath,
                "BIMiconToolbar.ViewOnSheet.ViewOnSheet"
                );

            PushButton pbViewOnSheet = panelSheets.AddItem(buttonViewOnSheet) as PushButton;
            pbViewOnSheet.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/ViewOnSheet/Images/iconViewOnSheet.png"));
            pbViewOnSheet.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/ViewOnSheet/Images/iconViewOnSheetSmall.png"));
            pbViewOnSheet.ToolTip         = "Place active view on selected sheet.";
            pbViewOnSheet.LongDescription = "Place active view on selected sheet.";

            // Set the context help when F1 pressed
            pbViewOnSheet.SetContextualHelp(contextHelpUrl);

            #endregion

            /*---Ribbon Panel Project---*/
            #region Ribbon Panel Project
            //Create push buttons for panelProject

            PushButtonData buttonNumberDoors = new PushButtonData(
                "NumberDoors",
                "Number\nDoors",
                assemblyPath,
                "BIMiconToolbar.NumberDoors.NumberDoors2020"
                );

            PushButton pbNumberDoors = panelProject.AddItem(buttonNumberDoors) as PushButton;
            pbNumberDoors.LargeImage = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberDoors/Images/iconNumberDoors.png"));
            pbNumberDoors.Image      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberDoors/Images/iconNumberDoorsSmall.png"));

            RibbonToolTip numberDoorsToolTip = Auxiliar.ButtonToolTip("NumberDoorsHelp.mp4",
                                                                      "BIMiconToolbar.NumberDoors.Images.NumberDoorsHelp.mp4",
                                                                      "Number doors according to room number.",
                                                                      "Assigns a door number according to room. The primary parameter to use for door number" +
                                                                      "is picked from the ToRoom paramter from the door. If there is no room on either side" +
                                                                      "of the door, no number will be assigned.");

            Auxiliar.SetRibbonItemToolTip(pbNumberDoors, numberDoorsToolTip);

            // Set the context help when F1 pressed
            pbNumberDoors.SetContextualHelp(contextHelpUrl);

            // Number Windows
            PushButtonData buttonNumberWindows = new PushButtonData(
                "NumberWindows",
                "Number\nWindows",
                assemblyPath,
                "BIMiconToolbar.NumberWindows.NumberWindows"
                );

            PushButton pbNumberWindows = panelProject.AddItem(buttonNumberWindows) as PushButton;
            pbNumberWindows.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberWindows/Images/iconNumberWindows.png"));
            pbNumberWindows.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberWindows/Images/iconNumberWindowsSmall.png"));
            pbNumberWindows.ToolTip         = "Number windows according to room number.";
            pbNumberWindows.LongDescription = "Assigns a window number according to room. The primary parameter to use for window number" +
                                              "is picked from the ToRoom paramter from the window. If there is no room on either side" +
                                              "of the window, no number will be assigned.";

            // Set the context help when F1 pressed
            pbNumberWindows.SetContextualHelp(contextHelpUrl);

            // Number by Spline
            PushButtonData buttonNumberBySpline = new PushButtonData(
                "NumberBySpline",
                "Number\nby Spline",
                assemblyPath,
                "BIMiconToolbar.NumberBySpline.NumberBySpline"
                );

            PushButton pbNumberBySpline = panelProject.AddItem(buttonNumberBySpline) as PushButton;
            pbNumberBySpline.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberBySpline/Images/iconNumberBySpline.png"));
            pbNumberBySpline.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/NumberBySpline/Images/iconNumberBySpline.png"));
            pbNumberBySpline.ToolTip         = "Number elements by intersecting with selected spline.";
            pbNumberBySpline.LongDescription = "Number elements of a selected category by interseting the bounding box with selected spline.";

            // Set the context help when F1 pressed
            pbNumberBySpline.SetContextualHelp(contextHelpUrl);

            // Match grids
            PushButtonData buttonMatchGrids = new PushButtonData(
                "MatchGrids",
                "Match\nGrids",
                assemblyPath,
                "BIMiconToolbar.MatchGrids.MatchGrids"
                );

            PushButton pbMatchGrids = panelProject.AddItem(buttonMatchGrids) as PushButton;
            pbMatchGrids.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/MatchGrids/Images/iconMatchGrids.png"));
            pbMatchGrids.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/MatchGrids/Images/iconMatchGridsSmall.png"));
            pbMatchGrids.ToolTip         = "Match grids display from one view to all selected views";
            pbMatchGrids.LongDescription = "Match grids display from one view to all other selected views.";

            // Set the context help when F1 pressed
            pbMatchGrids.SetContextualHelp(contextHelpUrl);

            // Mark Origin
            PushButtonData buttonMarkOrigin = new PushButtonData(
                "MarkerOrigin",
                "Mark\nOrigin",
                assemblyPath,
                "BIMiconToolbar.MarkOrigin.MarkOrigin"
                );

            PushButton pbMarkOrigin = panelProject.AddItem(buttonMarkOrigin) as PushButton;
            pbMarkOrigin.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/MarkOrigin/Images/iconMarkerOrigin.png"));
            pbMarkOrigin.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/MarkOrigin/Images/iconMarkerOrigin.png"));
            pbMarkOrigin.ToolTip         = "Marks in the current view Revit's internal origin";
            pbMarkOrigin.LongDescription = "Marks in the current view Revit's internal origin";

            // Set the context help when F1 pressed
            pbMarkOrigin.SetContextualHelp(contextHelpUrl);

            // Interior Elevations
            PushButtonData buttonInteriorElevations = new PushButtonData(
                "InteriorElevations",
                "Interior\nElevations",
                assemblyPath,
                "BIMiconToolbar.InteriorElevations.InteriorElevations"
                );

            PushButton pbInteriorElevations = panelProject.AddItem(buttonInteriorElevations) as PushButton;
            pbInteriorElevations.LargeImage      = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/InteriorElevations/Images/iconInteriorElev.png"));
            pbInteriorElevations.Image           = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/InteriorElevations/Images/iconInteriorElevSmall.png"));
            pbInteriorElevations.ToolTip         = "Creates interior elevations from selected rooms";
            pbInteriorElevations.LongDescription = "Creates interior elevations from selected rooms and place them onto sheets";

            // Set the context help when F1 pressed
            pbInteriorElevations.SetContextualHelp(contextHelpUrl);

            #endregion

            /*--- Ribbon Panel Support ---*/
            #region Panel Support

            //Create buttons for panelSupport
            PushButtonData buttonVersion = new PushButtonData(
                "Version",
                "Version",
                assemblyPath,
                "BIMiconToolbar.Support.Version.Version");

            PushButtonData buttonDocumentation = new PushButtonData(
                "Documentation",
                "Docs",
                assemblyPath,
                "BIMiconToolbar.Support.Docs.Docs");

            PushButtonData buttonHelp = new PushButtonData(
                "Help",
                "Help",
                assemblyPath,
                "BIMiconToolbar.Support.Help.Help");

            // Stacked items for stacked buttons
            IList <Autodesk.Revit.UI.RibbonItem> stackedSupport = panelSupport.AddStackedItems(buttonHelp, buttonDocumentation, buttonVersion);

            // Defining buttons
            PushButton pbHelp = stackedSupport[0] as PushButton;
            pbHelp.ToolTip         = "Get Help";
            pbHelp.LongDescription = "Contact us for any query or help";
            BitmapImage pbHelpImage = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/Support/Help/Images/iconHelpSmall.png"));
            pbHelp.Image = pbHelpImage;
            pbHelp.AvailabilityClassName = "BIMiconToolbar.Tab.CommandAvailability";
            // Set the context help when F1 pressed
            pbHelp.SetContextualHelp(contextHelpUrl);

            PushButton pbDocumentation = stackedSupport[1] as PushButton;
            pbDocumentation.ToolTip         = "Documentation";
            pbDocumentation.LongDescription = "Check our online documentation";
            BitmapImage pbDocumentationImage = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/Support/Docs/Images/iconDocSmall.png"));
            pbDocumentation.Image = pbDocumentationImage;
            pbDocumentation.AvailabilityClassName = "BIMiconToolbar.Tab.CommandAvailability";
            // Set the context help when F1 pressed
            pbDocumentation.SetContextualHelp(contextHelpUrl);

            PushButton pbVersion = stackedSupport[2] as PushButton;
            pbVersion.ToolTip         = "Display current version";
            pbVersion.LongDescription = "Retrieves current version";
            BitmapImage pbVersionImageSmall = new BitmapImage(new Uri("pack://application:,,,/BIMiconToolbar;component/Support/Version/Images/iconVersionSmall.png"));
            pbVersion.Image = pbVersionImageSmall;
            pbVersion.AvailabilityClassName = "BIMiconToolbar.Tab.CommandAvailability";
            // Set the context help when F1 pressed
            pbVersion.SetContextualHelp(contextHelpUrl);

            #endregion
        }