Example #1
0
        public static void CreateUI(RibbonPanel ribbonPanel)
        {
            // Create a push button to trigger a command add it to the ribbon panel.
            var thisAssembly = Assembly.GetExecutingAssembly();

            var buttonData = new PushButtonData
                             (
                "cmdRhinoInsideSample4", "Sample 4",
                thisAssembly.Location,
                MethodBase.GetCurrentMethod().DeclaringType.FullName
                             );

            var comboBoxData = new ComboBoxData("Category")
            {
                ToolTip = "Category where Sample 4 will place geometry."
            };

            var items = ribbonPanel.AddStackedItems(buttonData, comboBoxData);

            if (items[0] is PushButton pushButton)
            {
                pushButton.ToolTip    = "Eval a Grasshopper definition";
                pushButton.LargeImage = ImageBuilder.BuildImage("4");
                pushButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://github.com/mcneel/rhino.inside/blob/master/Autodesk/Revit/README.md#sample-4"));
            }

            categoriesComboBox = items[1] as Autodesk.Revit.UI.ComboBox;
            Revit.ApplicationUI.ViewActivated += ActiveUIApplication_ViewActivated;
        }
Example #2
0
        public static void CreateUI(RibbonPanel ribbonPanel)
        {
            // Create a push button to trigger a command add it to the ribbon panel.
            var thisAssembly = Assembly.GetExecutingAssembly();

            var buttonData = new PushButtonData
                             (
                "cmdRhinoInsideSample1", "Sample 1",
                thisAssembly.Location,
                MethodBase.GetCurrentMethod().DeclaringType.FullName
                             );

            if (ribbonPanel.AddItem(buttonData) is PushButton pushButton)
            {
                pushButton.ToolTip    = "Creates a mesh sphere";
                pushButton.LargeImage = ImageBuilder.BuildImage("1");
            }
        }
Example #3
0
        public static void CreateUI(RibbonPanel ribbonPanel)
        {
            // Create a push button to trigger a command add it to the ribbon panel.
            var thisAssembly = Assembly.GetExecutingAssembly();

            var buttonData = new PushButtonData
                             (
                "cmdRhinoInsideSample1", "Sample 1",
                thisAssembly.Location,
                MethodBase.GetCurrentMethod().DeclaringType.FullName
                             );

            if (ribbonPanel.AddItem(buttonData) is PushButton pushButton)
            {
                pushButton.ToolTip    = "Creates a mesh sphere";
                pushButton.LargeImage = ImageBuilder.BuildImage("1");
                pushButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://github.com/mcneel/rhino.inside/blob/master/Autodesk/Revit/README.md#sample-1"));
            }
        }