Esempio n. 1
0
        public SharedParametersMain(UIControlledApplication uIControlledApplication)
        {
            string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;

            RibbonPanel sharedParametersPanel = RibbonPanelSetting.ribbonPanel(uIControlledApplication, "Shared Parameters");

            PulldownButtonData loadParameterData = new PulldownButtonData("LoadParameters", "Load Parameters");
            RibbonItem         loadParameterItem = sharedParametersPanel.AddItem(loadParameterData);
            PulldownButton     loadOptionButton  = loadParameterItem as PulldownButton;

            // Icon made by Smartline from www.flaticon.com
            loadOptionButton.ToolTip    = "To add multiple shared parameters to multiple categories within a project or family.";
            loadOptionButton.LargeImage = RibbonPanelSetting.GetEmbeddedImage("RevitHandyTools.Resources.add_img_32x32.png");

            // Load to project
            PushButtonData loadToProjectPushButtonData = new PushButtonData("LoadToProject", "Load to project", thisAssemblyPath, "RevitHandyTools.SharedParameters.LoadToProjectCommand");

            loadToProjectPushButtonData.LargeImage = RibbonPanelSetting.GetEmbeddedImage("RevitHandyTools.Resources.add_img_32x32.png");
            loadToProjectPushButtonData.ToolTip    = String.Format(
                "{0}{1}", "Add multiple shared parameters to multiple categories within a project.\n", "This feature is only available in a project for project template");
            loadToProjectPushButtonData.AvailabilityClassName = "RevitHandyTools.AvailableInProjectDocument";

            // Load to family
            PushButtonData loadToFamilyPushButtonData = new PushButtonData("LoadToFamily", "Load to family", thisAssemblyPath, "RevitHandyTools.SharedParameters.LoadToFamilyCommand");

            loadToFamilyPushButtonData.LargeImage = RibbonPanelSetting.GetEmbeddedImage("RevitHandyTools.Resources.add_img_32x32.png");
            loadToFamilyPushButtonData.ToolTip    = String.Format(
                "{0}{1}", "Add multiple shared parameters to multiple categories within a family.\n", "This feature is only available in a family");
            loadToFamilyPushButtonData.AvailabilityClassName = "RevitHandyTools.AvailableInFamilyDocument";

            // Add buttons
            loadOptionButton.AddPushButton(loadToProjectPushButtonData);
            loadOptionButton.AddSeparator();
            loadOptionButton.AddPushButton(loadToFamilyPushButtonData);
        }
Esempio n. 2
0
        public DetailMain(UIControlledApplication uIControlledApplication)
        {
            string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;

            RibbonPanel detailPanel = RibbonPanelSetting.ribbonPanel(uIControlledApplication, "Detail");

            // TotalLineLength
            // Icon made by Good Ware from www.flaticon.com
            PushButton totalLineLengthPushbutton = detailPanel.AddItem(new PushButtonData("TotalLineLength", "Total Length", thisAssemblyPath, "RevitHandyTools.Detail.TotalLineLengthCommand")) as PushButton;

            totalLineLengthPushbutton.ToolTip    = "To add up total length of selected detail lines.";
            totalLineLengthPushbutton.LargeImage = RibbonPanelSetting.GetEmbeddedImage("RevitHandyTools.Resources.measurement_img_32x32.png");
        }
Esempio n. 3
0
        public CoordinationMain(UIControlledApplication uIControlledApplication)
        {
            string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;

            RibbonPanel coordinationPanel = RibbonPanelSetting.ribbonPanel(uIControlledApplication, "Coordination");

            // Icon made by Freepik from www.flaticon.com
            PushButtonData transmitModelPushbuttonData = new PushButtonData("TransmitModel", "Model Transmit", thisAssemblyPath, "RevitHandyTools.Coordination.TransmitModelCommand");

            transmitModelPushbuttonData.AvailabilityClassName = "RevitHandyTools.AvailableInThreeDView";

            PushButton transmitModelPushbutton = coordinationPanel.AddItem(transmitModelPushbuttonData) as PushButton;

            transmitModelPushbutton.ToolTip = String.Format(
                "{0}{1}", "To clean up the current project for model transmit.\n", "This feature is only available from 3D view");
            transmitModelPushbutton.LargeImage = RibbonPanelSetting.GetEmbeddedImage("RevitHandyTools.Resources.packing_img_32x32.png");
        }