예제 #1
0
        private void AddRibbonPanel(UIControlledApplication app)
        {
            RibbonPanel panel = app.CreateRibbonPanel("By Ehab Bkheit ");

            PushButtonData pbd_PL      = new PushButtonData("Placing Light ", "Placing Light", assyPath, "PlacingLight.Command");
            PushButton     pb_PLbutton = panel.AddItem(pbd_PL) as PushButton;


            // Reflection of path to image
            var globePath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "PLicon.png");
            Uri uriImage  = new Uri(globePath);
            // Apply image to bitmap
            BitmapImage largeImage = new BitmapImage(uriImage);

            // Apply image to button
            pb_PLbutton.LargeImage = largeImage;

            pb_PLbutton.ToolTip         = "Distribute hosted light family on false ceiling";
            pb_PLbutton.LongDescription =
                " Select hosted light fixture in false ceiling \npick two-point  to specify a rectangular Room on the screen \nEnter number of Row Light then enter number of Column Light\nstandard light distrubtion will be placed on ceiling x-2x-x ";

            //ContextualHe/lp contextHelp = new ContextualHelp(ContextualHelpType.ChmFile, dir + "/Resources/STFExporter Help.htm");
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "https://github.com/ehabElec");

            pb_PLbutton.SetContextualHelp(contextHelp);
        }
예제 #2
0
        /// <summary>
        /// On Start Up
        /// </summary>
        /// <param name="application"></param>
        /// <returns></returns>
        public Result OnStartup(UIControlledApplication application)
        {
            try
            {
                thisApp    = this;
                mainWindow = null;
                //Create a tab named HOK - Beta
                try { application.CreateRibbonTab(tabName); }
                catch { }

                //ribbon panel named BCF
                RibbonPanel panel           = application.CreateRibbonPanel(tabName, "BCF");
                string      currentAssembly = System.Reflection.Assembly.GetAssembly(this.GetType()).Location;
                //button image from resources
                BitmapSource sheetImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(Resources.walker.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                PushButton sheetButton = panel.AddItem(new PushButtonData("Smart BCF", "Smart BCF", currentAssembly, "HOK.SmartBCF.AddIn.Command")) as PushButton;
                sheetButton.LargeImage            = sheetImage;
                sheetButton.AvailabilityClassName = "HOK.SmartBCF.AddIn.Availability";

                //instruction file to open by F1 key
                string instructionFile = @"https://github.com/HOKGroup/SmartBCF";
                if (File.Exists(instructionFile))
                {
                    ContextualHelp contextualHelp = new ContextualHelp(ContextualHelpType.Url, instructionFile);
                    sheetButton.SetContextualHelp(contextualHelp);
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }

            return(Result.Succeeded);
        }
예제 #3
0
        private void InitRibbonButtons(RibbonPanel ribbonPanel)
        {
            CreatePushButton(ribbonPanel, "Select Category", "Select\nCategory", _path, "Walter.SelectCommand", "Korisnik ima mogućnost da izabere više prikazanih kategorija, te prilikom klika na dugme „Accept & Export“ , program će izvršiti pribavljanje svih odabranih kategorija (instanci) iz Revitovog modela i ispisati u txt fajl na Desktopu.", true, _resorce + @"select.png");
            ribbonPanel.AddSeparator();
            SplitButton splitButton = ribbonPanel.AddItem(new SplitButtonData("Auto Room Num", "Auto\nNumbering")) as SplitButton;

            splitButton.ToolTip    = "Alat kojim se automatizuje dodjela broja sobe. Korisniku omogućiti da unese od kog broja kreću brojevi soba.";
            splitButton.LargeImage = new BitmapImage(new Uri(_resorce + @"numbering.png"));
            PushButton pushButtonInput = splitButton.AddPushButton(new PushButtonData("Auto Room Num", "Auto\nNumbering", _path, "Walter.NumberingRoomCommand"));

            pushButtonInput.LargeImage = new BitmapImage(new Uri(_resorce + @"numbering.png"));
            pushButtonInput.ToolTip    = "Alat kojim se automatizuje dodjela broja sobe. Korisniku omogućuje da unese od kog broja kreću brojevi soba.";
            pushButtonInput.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://www.naviate.com/"));
            PushButton pushButtonAuto = splitButton.AddPushButton(new PushButtonData("Auto Room Num with start", "Auto Numbering\nFrom 100", _path, "Walter.AutoNumberingRoomCommand"));

            pushButtonAuto.LargeImage = new BitmapImage(new Uri(_resorce + @"autoNumbering.png"));
            pushButtonAuto.ToolTip    = "Alat kojim se automatizuje dodjela broja sobe koje postoje u modelu pocevsi od 100.";
            pushButtonAuto.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://www.naviate.com/"));
            ribbonPanel.AddSeparator();
            CreatePushButton(ribbonPanel, "Show Furniture", "Show\nFurniture", _path, "Walter.FurnitureCommand", "Alat kojim se prikazuje namještaj na spratu.", true, _resorce + @"furniture.png");
            ribbonPanel.AddSeparator();
            PushButton edit = CreatePushButton(ribbonPanel, "Edit Element", "Edit\nElement", _path, "Walter.EditElementCommand", "Alat omogućuje korisniku da za selektovani element budu prikazani svi parametri izabranog elementa. Korisnik ima mogućnost da unese novu vrijednost parametra i klikom na dugme „Ok“ svi elementi tog tipa koji se nalaze unutar projekta dobiće novu unesenu vrijednost", true, _resorce + @"edit.png");

            edit.Enabled = false;
            ribbonPanel.AddSeparator();
            CreatePushButton(ribbonPanel, "Insert Section", "Insert\nSection", _path, "Walter.InsertSectionCommand", "Alat omogucuje korisniku za selektovana vrata da se kreira section", true, _resorce + @"section.png");
            ribbonPanel.AddSeparator();
            CreatePushButton(ribbonPanel, "Insert Elevation", "Insert\nElevation", _path, "Walter.InsertElevationCommand", "Alat omogucuje korisniku za selektovanu sobu da se kreira elevation za svaku stranu", true, _resorce + @"elevation.png");
            ribbonPanel.AddSeparator();
        }
예제 #4
0
        public Result OnStartup(UIControlledApplication application)
        {
            try
            {
                thisApp    = this;
                mainWindow = null;

                try { application.CreateRibbonTab(tabName); }
                catch { }

                RibbonPanel panel           = application.CreateRibbonPanel(tabName, "BCF");
                string      currentAssembly = System.Reflection.Assembly.GetAssembly(this.GetType()).Location;

                BitmapSource sheetImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(Resources.walker.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

                PushButton sheetButton = panel.AddItem(new PushButtonData("Smart BCF", "Smart BCF", currentAssembly, "HOK.SmartBCF.AddIn.Command")) as PushButton;
                sheetButton.LargeImage            = sheetImage;
                sheetButton.AvailabilityClassName = "HOK.SmartBCF.AddIn.Availability";

                string instructionFile = @"V:\RVT-Data\HOK Program\Documentation\SmartBCF_Instruction.pdf";
                if (File.Exists(instructionFile))
                {
                    ContextualHelp contextualHelp = new ContextualHelp(ContextualHelpType.Url, instructionFile);
                    sheetButton.SetContextualHelp(contextualHelp);
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
            }

            return(Result.Succeeded);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="panel">Панель, на которой следует
        /// разместить добавляемую кнопку.</param>
        /// <param name="cmd_name">Имя команды</param>
        /// <param name="cmd_text">Ключ ресурса, содержащего
        /// отображаемое имя команды.
        /// </param>
        /// <param name="cmd_tooltip">Ключ ресурса, содержащего
        /// краткое описание команды.
        /// </param>
        /// <param name="long_description">Ключ ресурса,
        /// содержащего развёрнутое описание команды.</param>
        /// <param name="large_img_name">Ключ ресурса,
        /// содержащего изображение, располагающееся на новой
        /// кнопке.</param>
        /// <param name="tooltip_img_name">Ключ ресурса,
        /// содержащего изображение, отображаемое в развёрнутом
        /// описании команды.</param>
        /// <param name="cmd_type">Тип, определяющий команду.
        /// </param>
        /// <param name="aviability_type">Тип, выполняющий
        /// проверку доступности команды.</param>
        /// <param name="help">Настройки связи создаваемой
        /// кнопки с конкретным разделом справочной системы.
        /// </param>
        void AddRibbonItem(RibbonPanel panel,
                           string cmd_name, string cmd_text,
                           string cmd_tooltip, string long_description,
                           string large_img_name,
                           string tooltip_img_name,
                           Type cmd_type, Type aviability_type,
                           ContextualHelp help)
        {
            string this_assembly_path = Assembly
                                        .GetExecutingAssembly().Location;

            ResourceManager res_mng = new ResourceManager(
                typeof(Resources));

            string text = res_mng.GetString(cmd_text);

            PushButtonData button_data = new PushButtonData(
                cmd_name, text,
                this_assembly_path, cmd_type.FullName);

            button_data.AvailabilityClassName =
                aviability_type.FullName;

            PushButton push_button = panel.AddItem(
                button_data) as PushButton;

            string tooltip = res_mng.GetString(cmd_tooltip);

            push_button.ToolTip = tooltip;

            Bitmap large_image = (Bitmap)res_mng.GetObject(
                large_img_name);

            BitmapSource large_bitmap_src = Imaging
                                            .CreateBitmapSourceFromHBitmap(
                large_image.GetHbitmap(), IntPtr.Zero,
                Int32Rect.Empty, BitmapSizeOptions
                .FromEmptyOptions());

            push_button.LargeImage = large_bitmap_src;

            Bitmap tooltip_image = (Bitmap)res_mng.GetObject(
                tooltip_img_name);

            BitmapSource tooltip_bitmap_src = Imaging
                                              .CreateBitmapSourceFromHBitmap(
                tooltip_image.GetHbitmap(), IntPtr.Zero,
                Int32Rect.Empty, BitmapSizeOptions
                .FromEmptyOptions());

            push_button.ToolTipImage = tooltip_bitmap_src;

            push_button.LongDescription = res_mng.GetString(
                long_description);

            push_button.SetContextualHelp(help);

            res_mng.ReleaseAllResources();
        }
예제 #6
0
        /// <summary>
        /// Create UI on StartUp
        /// </summary>
        /// <param name="application"></param>
        /// <returns></returns>
        public Result OnStartup(UIControlledApplication application)
        {
            RibbonPanel grevitPanel = null;

            foreach (RibbonPanel rpanel in application.GetRibbonPanels())
            {
                if (rpanel.Name == "Grevit")
                {
                    grevitPanel = rpanel;
                }
            }

            if (grevitPanel == null)
            {
                grevitPanel = application.CreateRibbonPanel("Grevit");
            }

            PushButton commandButton = grevitPanel.AddItem(new PushButtonData("GrevitCommand", "Grevit", path, "Grevit.Revit.GrevitCommand")) as PushButton;

            commandButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                Properties.Resources.paper_airplane.GetHbitmap(),
                IntPtr.Zero,
                System.Windows.Int32Rect.Empty,
                BitmapSizeOptions.FromWidthAndHeight(32, 32));

            commandButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/"));

            PushButton parameterButton = grevitPanel.AddItem(new PushButtonData("ParameterNames", "Parameter names", path, "Grevit.Revit.ParameterNames")) as PushButton;

            parameterButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                Properties.Resources.tag_hash.GetHbitmap(),
                IntPtr.Zero,
                System.Windows.Int32Rect.Empty,
                BitmapSizeOptions.FromWidthAndHeight(32, 32));

            parameterButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/"));

            PushButton getFaceRefButton = grevitPanel.AddItem(new PushButtonData("GetFaceReference", "Face Reference", path, "Grevit.Revit.GrevitFaceReference")) as PushButton;

            getFaceRefButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                Properties.Resources.radio_button.GetHbitmap(),
                IntPtr.Zero,
                System.Windows.Int32Rect.Empty,
                BitmapSizeOptions.FromWidthAndHeight(32, 32));

            getFaceRefButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "http://grevit.net/"));

            PushButton speckleButton = grevitPanel.AddItem(new PushButtonData("Speckle Client", "Speckle Client", path, "Grevit.Revit.GrevitFaceReference")) as PushButton;

            speckleButton.LargeImage = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                Properties.Resources.speckle.GetHbitmap(),
                IntPtr.Zero,
                System.Windows.Int32Rect.Empty,
                BitmapSizeOptions.FromWidthAndHeight(32, 32));

            speckleButton.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, "https://github.com/speckleworks/Grevit"));

            return(Result.Succeeded);
        }
예제 #7
0
        public Result OnStartup(UIControlledApplication application)
        {
            //IL_000f: Unknown result type (might be due to invalid IL or missing references)
            //IL_001f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0026: Unknown result type (might be due to invalid IL or missing references)
            //IL_002b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0032: Unknown result type (might be due to invalid IL or missing references)
            //IL_0037: Unknown result type (might be due to invalid IL or missing references)
            //IL_0038: Unknown result type (might be due to invalid IL or missing references)
            //IL_004d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0052: Unknown result type (might be due to invalid IL or missing references)
            //IL_0057: Expected O, but got Unknown
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_005d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0069: Unknown result type (might be due to invalid IL or missing references)
            //IL_007a: Unknown result type (might be due to invalid IL or missing references)
            //IL_008b: Unknown result type (might be due to invalid IL or missing references)
            //IL_008c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0093: Unknown result type (might be due to invalid IL or missing references)
            //IL_009a: Unknown result type (might be due to invalid IL or missing references)
            //IL_00af: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b9: Expected O, but got Unknown
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
            //IL_00df: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
            this.m_MyForm = null;
            string text = "Hot Gear";

            try
            {
                application.CreateRibbonTab(text);
            }
            catch
            {
            }
            RibbonPanel    val            = application.CreateRibbonPanel(text, "Parameter Explorer");
            ContextualHelp contextualHelp = new ContextualHelp(2, "https://hotgearproject.wordpress.com/hot-gear-project-2/");
            PushButton     val2           = val.AddItem(new PushButtonData("HotGear_IPE", "Instance", HotGearPackage.AddInPath, "InstanceParameterCollector")) as PushButton;

            val2.set_ToolTip("Collect Project Instance Elements Data");
            val2.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Instance.png"));
            val2.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Instance_s.png"));
            val2.SetContextualHelp(contextualHelp);
            val.AddSeparator();
            PushButton val3 = val.AddItem(new PushButtonData("HotGear_TPE", "Type", HotGearPackage.AddInPath, "TypeParameterCollector")) as PushButton;

            val3.set_ToolTip("Collect Project Type Elements Data");
            val3.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Type.png"));
            val3.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Type_s.png"));
            val3.SetContextualHelp(contextualHelp);
            return(0);
        }
예제 #8
0
 public Result OnStartup(UIControlledApplication application)
 {
     //IL_0009: Unknown result type (might be due to invalid IL or missing references)
     //IL_0032: Unknown result type (might be due to invalid IL or missing references)
     //IL_0048: Unknown result type (might be due to invalid IL or missing references)
     //IL_004a: Unknown result type (might be due to invalid IL or missing references)
     //IL_004f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0054: Unknown result type (might be due to invalid IL or missing references)
     //IL_0057: Unknown result type (might be due to invalid IL or missing references)
     //IL_005c: Unknown result type (might be due to invalid IL or missing references)
     //IL_005e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0075: Unknown result type (might be due to invalid IL or missing references)
     //IL_007a: Unknown result type (might be due to invalid IL or missing references)
     //IL_007f: Expected O, but got Unknown
     //IL_007f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0084: Unknown result type (might be due to invalid IL or missing references)
     //IL_0086: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
     //IL_00ee: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
     //IL_010e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0113: Unknown result type (might be due to invalid IL or missing references)
     try
     {
         string text = "HTSS Add-Ins";
         try
         {
             application.CreateRibbonTab(text);
         }
         catch (ArgumentException)
         {
         }
         catch (InvalidOperationException)
         {
             text = string.Empty;
         }
         string      text2 = "Family Manager Basic";
         string      text3 = "Family Manager Basic";
         RibbonPanel val3  = null;
         val3 = ((!(text == string.Empty)) ? application.CreateRibbonPanel(text, text2) : application.CreateRibbonPanel(text2));
         PushButton val4 = val3.AddItem(new PushButtonData(text3, text3, FamMgrBasicAppln.AddInPath, typeof(FamMgrBasicCmd).FullName));
         val4.set_LargeImage((ImageSource) new BitmapImage(new Uri(Path.Combine(FamMgrBasicAppln.IconsFolder, "FM32.png"), UriKind.Absolute)));
         val4.set_Image((ImageSource) new BitmapImage(new Uri(Path.Combine(FamMgrBasicAppln.IconsFolder, "FM32.png"), UriKind.Absolute)));
         val4.set_ToolTip("Load and save families from other revit projects");
         ContextualHelp contextualHelp = new ContextualHelp(3, FamMgrBasicAppln.IconsFolder + "\\FMB_help.chm");
         val4.SetContextualHelp(contextualHelp);
         return(0);
     }
     catch (Exception ex)
     {
         FamMgr_Util.ShowMessage(ex.ToString());
         return(-1);
     }
 }
예제 #9
0
        /// <summary>
        /// Implement this method to implement the external application which should be called when
        /// Revit starts before a file or default template is actually loaded.
        /// </summary>
        /// <param name="application">An object that is passed to the external application which contains the controlled application.</param>
        /// <returns>Return the status of the external application. A result of Succeeded means that the external application successfully started. Cancelled can be used to signify that the user cancelled the external operation at some point. If false is returned then Revit should inform the user that the external application failed to load and release the internal reference.</returns>
        public Result OnStartup(UIControlledApplication application)
        {
            Result ret = Result.Failed;

            Debug.Print("App.OnStartup");
            //Utils.InfoMsg("App.OnStartup");
            // Initialise the global settings
            if (true)
            {
                Process process = Process.GetCurrentProcess();

                try
                {
                    // Typical add in location "C:\ProgramData\Autodesk\ApplicationPlugins\3DIR 3D Information Retrieval.bundle\Contents\Source\ADR_3DIR.2015.dll"
                    // Typical help location   "C:\ProgramData\Autodesk\ApplicationPlugins\3DIR 3D Information Retrieval.bundle\Contents\Resources\3DIRComprehensiveHelp.htm"
                    string sAddInPath = typeof(App).Assembly.Location;
                    string sHelpFile  = System.IO.Path.GetDirectoryName(sAddInPath);
                    sHelpFile = System.IO.Path.GetDirectoryName(sHelpFile) + "\\Resources\\3DIRComprehensiveHelp.htm";
                    string sNamespacePrefix = typeof(App).Namespace + ".";
                    // Add a 3DIR ribbon panel with 4 buttons
                    RibbonPanel ribbonPanel = application.CreateRibbonPanel("BIM_search");

                    PushButton pushButton = (PushButton)ribbonPanel.AddItem(new PushButtonData("Structure Archive", "Structure Archive", sAddInPath, sNamespacePrefix + "Lab1PlaceGroup"));
                    pushButton.LargeImage = new BitmapImage(new Uri(@"C:\Users\Tarun Sahu\AppData\Roaming\Autodesk\Revit\Addins\2015\Search-L.png"));
                    pushButton.Image      = new BitmapImage(new Uri(@"C:\Users\Tarun Sahu\AppData\Roaming\Autodesk\Revit\Addins\2015\Search-S.png"));
                    pushButton.ToolTip    = "Search the building model for related information.";
                    ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.ChmFile, sHelpFile);
                    pushButton.SetContextualHelp(contextHelp);
                    pushButton            = (PushButton)ribbonPanel.AddItem(new PushButtonData("BIM Ask", "BIM Ask", sAddInPath, sNamespacePrefix + "Ask"));
                    pushButton.LargeImage = new BitmapImage(new Uri(@"C:\Users\Tarun Sahu\AppData\Roaming\Autodesk\Revit\Addins\2015\Ask.png", UriKind.RelativeOrAbsolute));
                    pushButton.Image      = new BitmapImage(new Uri(@"C:\Users\Tarun Sahu\AppData\Roaming\Autodesk\Revit\Addins\2015\Ask-s.png", UriKind.RelativeOrAbsolute));
                    pushButton.ToolTip    = "Search the building model for related information.";
                    contextHelp           = new ContextualHelp(ContextualHelpType.ChmFile, sHelpFile);
                    pushButton.SetContextualHelp(contextHelp);

                    //_selectionChangedWatcher.SelectionChanged += new EventHandler(OnSelectionChanged);

                    ret = Result.Succeeded;
                }
                catch
                {
                }
            }
            return(ret);
        }
예제 #10
0
        private void AddPushButtonData(string name, string text, string description, string className, PulldownButton pullDown, Source.Source imageSource)
        {
            PushButtonData data   = new PushButtonData(name, text, Assembly.GetExecutingAssembly().Location, className);
            PushButton     button = pullDown.AddPushButton(data) as PushButton;

            button.ToolTip         = description;
            button.LongDescription = string.Format("Версия: {0}\nСборка: {1}-{2}", ModuleData.Version, ModuleData.Build, ModuleData.Date);
            button.ItemText        = text;
            button.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, ModuleData.ManualPage));
            button.LargeImage = new BitmapImage(new Uri(imageSource.Value));
        }
예제 #11
0
        private void AddPushButton(RibbonPanel panel)
        {
            PushButton pushButton = panel.AddItem(new PushButtonData("Export", "Export to Boldarc", this.AssemblyFullName, "BoldarcRevitPlugin.Activate")) as PushButton;

            pushButton.ToolTip = "Export to Boldarc";
            ContextualHelp contextualHelp = new ContextualHelp(0, "Boldarc support info goes here.");

            pushButton.SetContextualHelp(contextualHelp);
            //pushButton.set_LargeImage(Imaging.CreateBitmapSourceFromHBitmap(Resources.LogoBig.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()));
            //pushButton.set_Image(Imaging.CreateBitmapSourceFromHBitmap(Resources.LogoSmall.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()));
        }
예제 #12
0
        public Result OnStartup(UIControlledApplication application)
        {
            //Create  A button
            RibbonPanel CarboCalcPanel = application.CreateRibbonPanel("CarboLifeCalc");

            //Info
            string         HelpURL        = "https://github.com/DavidVeld/CarboLifeCalc/wiki";
            ContextualHelp contextualHelp = new ContextualHelp(ContextualHelpType.Url, HelpURL);

            //Create  A button
            PushButton pB_CarboCalc = CarboCalcPanel.AddItem(new PushButtonData("CarboLifeCalc", "New Project", MyAssemblyPath, "CarboLifeRevit.CarboLifeCalc")) as PushButton;
            //LImage
            Uri         img_CarboCalc  = new Uri(MyAssemblyDir + @"\img\ico_CarboLife32.png");
            BitmapImage limg_CarboCalc = new BitmapImage(img_CarboCalc);
            //SImahe
            Uri         imgsmll_CarboCalc = new Uri(MyAssemblyDir + @"\img\ico_CarboLife16.png");
            BitmapImage smllimg_CarboCalc = new BitmapImage(imgsmll_CarboCalc);

            pB_CarboCalc.LargeImage = limg_CarboCalc;
            pB_CarboCalc.Image      = smllimg_CarboCalc;
            pB_CarboCalc.SetContextualHelp(contextualHelp);
            pB_CarboCalc.ToolTip = "Create a new Carbo Calc Project using the BIM model";


            PushButton pB_ImportCarboCalc = CarboCalcPanel.AddItem(new PushButtonData("Import CarboLife Calc", "Update Project", MyAssemblyPath, "CarboLifeRevit.CarboLifeCalcUpdate")) as PushButton;
            //LImage
            Uri         img_CarboCalc2  = new Uri(MyAssemblyDir + @"\img\ico_UpdateCarboLife32.png");
            BitmapImage limg_CarboCalc2 = new BitmapImage(img_CarboCalc2);
            //SImahe
            Uri         imgsmll_CarboCalc2 = new Uri(MyAssemblyDir + @"\img\ico_UpdateCarboLife16.png");
            BitmapImage smllimg_CarboCalc2 = new BitmapImage(imgsmll_CarboCalc2);

            pB_ImportCarboCalc.LargeImage = limg_CarboCalc2;
            pB_ImportCarboCalc.Image      = smllimg_CarboCalc2;
            pB_ImportCarboCalc.SetContextualHelp(contextualHelp);
            pB_ImportCarboCalc.ToolTip = "Update an existing Carbo Life Calc Project using the BIM model";

            PushButton pB_CarboCalcPlus = CarboCalcPanel.AddItem(new PushButtonData("CarboLifeCalcSettings", "Settings", MyAssemblyPath, "CarboLifeRevit.CarboLifeCalcPlus")) as PushButton;
            //LImage
            Uri         img_CarboImport  = new Uri(MyAssemblyDir + @"\img\ico_CarboLifeSettings32.png");
            BitmapImage limg_CarboImport = new BitmapImage(img_CarboImport);
            //SImahe
            Uri         imgsmll_CarboImport = new Uri(MyAssemblyDir + @"\img\ico_CarboLifeSettings16.png");
            BitmapImage smllimg_CarboImport = new BitmapImage(imgsmll_CarboImport);

            pB_CarboCalcPlus.LargeImage = limg_CarboImport;
            pB_CarboCalcPlus.Image      = smllimg_CarboImport;
            pB_CarboCalcPlus.SetContextualHelp(contextualHelp);
            pB_CarboCalcPlus.ToolTip = "Advanced export settings";


            return(Result.Succeeded);
        }
예제 #13
0
        private void AddPushButtonData(string name, string text, string description, string className, RibbonPanel panel, Source.Source imageSource, bool avclass, string url = null)
        {
            PushButtonData data   = new PushButtonData(name, text, Assembly.GetExecutingAssembly().Location, className);
            PushButton     button = panel.AddItem(data) as PushButton;

            button.ToolTip = description;
            if (avclass)
            {
                button.AvailabilityClassName = "ExtensibleOpeningManager.Availability.StaticAvailable";
            }
            button.LongDescription = string.Format("Версия: {0}\nСборка: {1}-{2}", ModuleData.Version, ModuleData.Build, ModuleData.Date);
            button.ItemText        = text;
            if (url == null)
            {
                button.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, ModuleData.ManualPage));
            }
            else
            {
                button.SetContextualHelp(new ContextualHelp(ContextualHelpType.Url, url));
            }
            button.LargeImage = new BitmapImage(new Uri(imageSource.Value));
        }
        private void AddPushButtonOfContextHelp(RibbonPanel panel)
        {
            PushButton pushButton = panel.AddItem(new PushButtonData("HelloWorld",
                                                                     "HelloWorld", @"D:\Sample\HelloWorld\bin\Debug\HelloWorld.dll", "HelloWorld.CsHelloWorld")) as PushButton;

            pushButton.ToolTip = "Say Hello World";
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url,
                                                            "http://www.autodesk.com");

            pushButton.SetContextualHelp(contextHelp);

            pushButton.LargeImage = new System.Windows.Media.Imaging.BitmapImage(new Uri(@"D:\Sample\HelloWorld\bin\Debug\39-Globe_32x32.png"));
        }
        public Result OnStartup(UIControlledApplication application)
        {
            string text = "Hot Gear";

            try
            {
                application.CreateRibbonTab(text);
            }
            catch
            {
            }
            RibbonPanel     val            = application.CreateRibbonPanel(text, "Element Merger");
            ContextualHelp  contextualHelp = new ContextualHelp(2, "https://hotgearproject.gitbooks.io/hotgear-project/content/element_merger.html");
            SplitButtonData val2           = new SplitButtonData("HotGear", "HotGear");
            SplitButton     val3           = val.AddItem(val2) as SplitButton;
            PushButton      val4           = val3.AddPushButton(new PushButtonData("JoinAll", "Join All", HotGearPackage.AddInPath, "JoinAll"));

            val4.set_ToolTip("Join All Selected Category in Project.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.JoinAll.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.JoinAll_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("JoinPush", "Join Selection", HotGearPackage.AddInPath, "JoinElement"));
            val4.set_ToolTip("Join Revit Current Selection Element.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Join.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Join_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("UnjoinPush", "Unjoin Selection", HotGearPackage.AddInPath, "UnjoinElement"));
            val4.set_ToolTip("Unjoin Revit Current Selection Element.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Unjoin.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Unjoin_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("SwitchPush", "Switch Join Order", HotGearPackage.AddInPath, "SwitchJoinOrder"));
            val4.set_ToolTip("Switch Join Order of Revit Current Selection Element.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Switch.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Switch_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("CutPush", "Cut Selection", HotGearPackage.AddInPath, "CutElement"));
            val4.set_ToolTip("Cut Revit Current Selection Element.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Cut.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.Cut_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("UnCutPush", "UnCut Selection", HotGearPackage.AddInPath, "UnCutElement"));
            val4.set_ToolTip("UnCut Revit Current Selection Element.");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.UnCut.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.UnCut_s.png"));
            val4.SetContextualHelp(contextualHelp);
            val4 = val3.AddPushButton(new PushButtonData("About", "About", HotGearPackage.AddInPath, "About"));
            val4.set_ToolTip("About HotGear Project");
            val4.set_LargeImage(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.gear32.png"));
            val4.set_Image(HotGearPackage.RetriveImage("HotGearAllInOne.Resources.gear16.png"));
            val4.SetContextualHelp(contextualHelp);
            return(0);
        }
예제 #16
0
        Result IExternalApplication.OnStartup(UIControlledApplication application)
        {
            try
            {
                Exporter.Instance.settings = new Settings(SaveFormat.ascii, ElementsExportRange.OnlyVisibleOnes, true, true,
                                                          false, false,
                                                          false, 0, 101, 1, 100, 2 /*purgeWrite*/, 8, 7, 4);

                string      str           = "OpenFOAM Exporter";
                RibbonPanel panel         = application.CreateRibbonPanel(str);
                string      directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

                string assemblyname = typeof(OpenFOAMExporterUI).Assembly.GetName().Name;
                string dllName      = directoryName + @"\" + assemblyname + ".dll";

                PushButtonData setupData   = new PushButtonData("OpenFOAM Simulate", "Simulate", dllName, "BIM.OpenFOAMExport.OpenFOAMSimulateCommand");
                PushButton     setupButton = panel.AddItem(setupData) as PushButton;
                using (Stream xstr = new MemoryStream())
                {
                    BIM.Properties.Resources.logo_64.Save(xstr, System.Drawing.Imaging.ImageFormat.Bmp);
                    xstr.Seek(0, SeekOrigin.Begin);
                    BitmapDecoder bdc = new BmpBitmapDecoder(xstr, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
                    setupButton.LargeImage = bdc.Frames[0];
                }
                setupButton.ToolTip         = "The OpenFOAM Exporter for Revit is designed to produce a stereolithography file (STL) of your building model and a OpenFOAM-Config.";
                setupButton.LongDescription = "The OpenFOAM Exporter for the Autodesk Revit Platform is a project designed to create an STL file from a 3D building information model for OpenFOAM with a Config-File that includes the boundary conditions for airflow simulation.";
                ContextualHelp help = new ContextualHelp(ContextualHelpType.ChmFile, directoryName + @"\Resources\ADSKSTLExporterHelp.htm");
                setupButton.SetContextualHelp(help);

                PushButtonData data   = new PushButtonData("OpenFOAM Exporter settings", "Settings", dllName, "BIM.OpenFOAMExport.OpenFOAMExportCommand");
                PushButton     button = panel.AddItem(data) as PushButton;
                using (Stream xstr = new MemoryStream())
                {
                    BIM.Properties.Resources.setupIcon.Save(xstr, System.Drawing.Imaging.ImageFormat.Bmp);
                    xstr.Seek(0, SeekOrigin.Begin);
                    BitmapDecoder bdc = new BmpBitmapDecoder(xstr, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
                    button.LargeImage = bdc.Frames[0];
                }
                button.ToolTip         = "The OpenFOAM Exporter for Revit is designed to produce a stereolithography file (STL) of your building model and a OpenFOAM-Config.";
                button.LongDescription = "The OpenFOAM Exporter for the Autodesk Revit Platform is a project designed to create an STL file from a 3D building information model for OpenFOAM with a Config-File that includes the boundary conditions for airflow simulation.";
                button.SetContextualHelp(help);

                return(Result.Succeeded);
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.ToString(), "OpenFOAM Exporter for Revit");
                return(Result.Failed);
            }
        }
예제 #17
0
        public Result OnStartup(UIControlledApplication application)
        {
            // Get the absolut path of this assembly
            string ExecutingAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly(
                ).Location;

            // Create a ribbon panel
            RibbonPanel m_projectPanel = application.CreateRibbonPanel(
                "Value Finder");

            //Execute File location
            string fileLctn = NameSpaceNm + ".MainCommand";

            //Button
            PushButton pushButton = m_projectPanel.AddItem(new PushButtonData(
                                                               "Value Finder", "Value Finder", ExecutingAssemblyPath,
                                                               fileLctn)) as PushButton;

            //Add Help ToolTip
            pushButton.ToolTip = NameSpaceNm;

            //Add long description
            pushButton.LongDescription =
                "Search in your model elements with a specific parameter and value. You can filter any category " +
                "that you want, then any parameter and finally select the value that you are looking for.";

            //Icon file location
            string iconFlLctn = NameSpaceNm + ".Resources.Icon.png";

            // Set the large image shown on button.
            pushButton.LargeImage = PngImageSource(
                iconFlLctn);

            // Get the location of the solution DLL
            string path = System.IO.Path.GetDirectoryName(
                System.Reflection.Assembly.GetExecutingAssembly().Location);

            // Combine path with \
            string newpath = Path.GetFullPath(Path.Combine(path, @"..\"));


            ContextualHelp contextHelp = new ContextualHelp(
                ContextualHelpType.Url,
                "https://engworks.com/values-finder/");

            // Assign contextual help to pushbutton
            pushButton.SetContextualHelp(contextHelp);

            return(Result.Succeeded);
        }
예제 #18
0
        public Result OnStartup(UIControlledApplication application)
        {
            // Get the absolut path of this assembly
            string ExecutingAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly(
                ).Location;

            // Create a ribbon panel
            RibbonPanel m_projectPanel = application.CreateRibbonPanel(
                "Clasher");

            //Button
            PushButton pushButton = m_projectPanel.AddItem(new PushButtonData(
                                                               "Clasher", "Clasher", ExecutingAssemblyPath,
                                                               "Clasher.Main")) as PushButton;

            //Add Help ToolTip
            pushButton.ToolTip = "Clash Detection";

            //Add long description
            pushButton.LongDescription =
                "This addin helps you to renumber MEP part with a prefix";

            // Set the large image shown on button.
            pushButton.LargeImage = PngImageSource(
                "Clasher.Resources.ClasherIcon.png");

            // Get the location of the solution DLL
            string path = System.IO.Path.GetDirectoryName(
                System.Reflection.Assembly.GetExecutingAssembly().Location);

            // Combine path with \
            string newpath = Path.GetFullPath(Path.Combine(path, @"..\"));

            // Set the contextual help to point Help.html
            //ContextualHelp contextHelp = new ContextualHelp(
            //    ContextualHelpType.ChmFile,
            //    newpath + "Resources\\Help.html");

            ContextualHelp contextHelp = new ContextualHelp(
                ContextualHelpType.Url,
                "https://engworks.com/Clasher/");

            // Assign contextual help to pushbutton
            pushButton.SetContextualHelp(contextHelp);

            m_MyForm = null; // no dialog needed yet; the command will bring it
            thisApp  = this; // static access to this application instance

            return(Result.Succeeded);
        }
예제 #19
0
        Result IExternalApplication.OnStartup(UIControlledApplication application)
        {
            try
            {
                //set default settings
                Exporter.Instance.settings = new(
                    SaveFormat.ascii,
                    ElementsExportRange.OnlyVisibleOnes,
                    true,
                    false,
                    false,
                    false,
                    0,
                    101,
                    1,
                    100,
                    2 /*purgeWrite*/,
                    8,
                    7,
                    4
                    );

                string      appName      = "OpenFOAM Interface";
                RibbonPanel panel        = application.CreateRibbonPanel(appName);
                string      dirName      = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                string      assemblyname = typeof(OpenFOAMInterfaceApp).Assembly.GetName().Name;
                string      dllName      = dirName + @"\" + assemblyname + ".dll";

                PushButtonData simBtnData     = new("OpenFOAM Simulate", "Simulate", dllName, "OpenFOAMInterface.BIM.OpenFOAMSimulateCommand");
                PushButton     simulateButton = panel.AddItem(simBtnData) as PushButton;
                using (Stream xstr = new MemoryStream())
                {
                    Properties.Resources.openfoaminterface.Save(xstr, System.Drawing.Imaging.ImageFormat.Bmp);
                    xstr.Seek(0, SeekOrigin.Begin);
                    BitmapDecoder bdc = new BmpBitmapDecoder(xstr, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
                    simulateButton.LargeImage = bdc.Frames[0];
                }
                simulateButton.ToolTip         = "The OpenFOAM Interface for Revit is designed to produce a stereolithography file (STL) of your building model and a OpenFOAM-Config.";
                simulateButton.LongDescription = "The OpenFOAM Iterface for Autodesk Revit is a project designed to create an STL file from a 3D building information model for OpenFOAM with a Config-File that includes the boundary conditions for airflow simulations.";
                ContextualHelp help = new(ContextualHelpType.ChmFile, dirName + @"\Resources\OpenFoamInterfaceHelp.html");
                simulateButton.SetContextualHelp(help);

                return(Result.Succeeded);
            }
            catch (Exception e)
            {
                OpenFOAMDialogManager.ShowDialogException(e);
                return(Result.Failed);
            }
        }
예제 #20
0
        private void AddPushButtonWithImage(RibbonPanel panel, string dllPath, string name, string text, string className, string imagePath)
        {
            PushButtonData buttonData = new PushButtonData(name, text, dllPath, className);
            PushButton     pushButton = panel.AddItem(buttonData) as PushButton;

            // Set ToolTip and contextual help
            pushButton.ToolTip = "Say Hello World";
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.autodesk.com");

            pushButton.SetContextualHelp(contextHelp);

            // Set the large image shown on button
            pushButton.LargeImage = new BitmapImage(new Uri(imagePath));
        }
예제 #21
0
        public Result OnStartup(UIControlledApplication application)
        {
            // Get the absolut path of this assembly
            string ExecutingAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly(
                ).Location;

            // Create a ribbon panel
            RibbonPanel m_projectPanel = application.CreateRibbonPanel(
                NameSpaceNm);

            //Execute File location
            string fileLctn = NameSpaceNm + ".MainCommand";

            //Button
            PushButton pushButton = m_projectPanel.AddItem(new PushButtonData(
                                                               NameSpaceNm, NameSpaceNm, ExecutingAssemblyPath,
                                                               fileLctn)) as PushButton;

            //Add Help ToolTip
            pushButton.ToolTip = NameSpaceNm;

            //Add long description
            pushButton.LongDescription =
                "This addin helps you to ...";

            //Icon file location
            string iconFlLctn = NameSpaceNm + ".Resources.Icon.png";

            // Set the large image shown on button.
            pushButton.LargeImage = PngImageSource(
                iconFlLctn);

            // Get the location of the solution DLL
            string path = System.IO.Path.GetDirectoryName(
                System.Reflection.Assembly.GetExecutingAssembly().Location);

            // Combine path with \
            string newpath = Path.GetFullPath(Path.Combine(path, @"..\"));


            ContextualHelp contextHelp = new ContextualHelp(
                ContextualHelpType.Url,
                "https://google.com");

            // Assign contextual help to pushbutton
            pushButton.SetContextualHelp(contextHelp);

            return(Result.Succeeded);
        }
예제 #22
0
        /// <summary> 添加“绘制面层对象”的按钮 </summary>
        private void AddPushButtonDrawFaceWall(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("DrawFaceWall", "绘制面层", Path.Combine(Path_Dlls, Dll_eZRvt),
                                                 "eZRvt.Commands.cmd_DrawFaceWall")) as PushButton;

            pushButton.ToolTip = "绘制面层对象";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.cmie.cn");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "DrawFace_32.png")));
        }
예제 #23
0
        private void AddRibbonPanel(UIControlledApplication app)
        {
            RibbonPanel panel = app.CreateRibbonPanel("Panel Schedule Exporter");

            PushButtonData pbd_Export = new PushButtonData("Export Panel Schedules", "Export Panel Schedules", assyPath, "PanelScheduleExporter.PanelScheduleExport");
            PushButton     pb_Ex      = panel.AddItem(pbd_Export) as PushButton;

            pb_Ex.LargeImage      = NewBitmapImage("panelScheduleExporter.png");
            pb_Ex.ToolTip         = "Export project Panel Schedules to Exel (XLSX) files";
            pb_Ex.LongDescription = "Opens dialog box to select project panel schedules for exporting out to Excel documents in a folder specified by the user.";

            ContextualHelp help = new ContextualHelp(ContextualHelpType.ChmFile, dir + "/help.htm");

            pb_Ex.SetContextualHelp(help);
        }
예제 #24
0
        /// <summary> 添加“自动查看开挖工况”的按钮 </summary>
        private void AddPushButtonViewStageDynamically(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("ViewStageDynamically", "动态展示", Path.Combine(Path_Dlls, Dll_Projects),
                                                 "OldW.Commands.cmd_ViewStageDynamically")) as PushButton;

            pushButton.ToolTip = "动态查看指定日期的开挖工况";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.autodesk.com");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "ViewStage_32.png")));
        }
예제 #25
0
        /// <summary> 添加“隐藏指定标高范围由的线管”的按钮 </summary>
        private void AddPushButtonHideConduit(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("HideConduit", "隐藏线管", Path.Combine(Path_Dlls, Dll_eZRvt),
                                                 "eZRvt.Commands.cmd_HideConduit")) as PushButton;

            pushButton.ToolTip = "隐藏指定标高范围由的线管";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.cmie.cn");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "Filter_32.png")));
        }
예제 #26
0
        /// <summary> 添加“打开面层面板”的按钮 </summary>
        private void AddPushButtonHideRange(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("HideRange", "线管过滤", Path.Combine(ProjectPath.Dlls, Dll_Projects),
                                                 "ConduitLayout.cmd_HideRange")) as PushButton;

            pushButton.ToolTip = "将指定标高范围内的线管进行显示或者临时隐藏";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.cmie.cn");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ProjectPath.Dlls, "Filter-32.png")));
        }
예제 #27
0
        /// <summary> 添加“线管连接”的按钮 </summary>
        private void AddPushButtonConduitLayout(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("ConduitLayout", "线管连接", Path.Combine(Path_Dlls, Dll_eZRvt),
                                                 "eZRvt.Commands.cmd_ConduitLayout")) as PushButton;

            pushButton.ToolTip = "将线管与电气设备进行连接";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.cmie.cn");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "ConduitLayout_32.png")));
        }
예제 #28
0
        /// <summary> 添加“手动查看开挖工况”的按钮 </summary>
        private void AddPushButtonShowOldWModel(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("ShowOldWModel", "基坑展示", Path.Combine(Path_Dlls, Dll_Projects),
                                                 "OldW.Commands.cmd_ShowOldWModel")) as PushButton;

            pushButton.ToolTip = "将模型中与基坑开挖施工相关的开挖单元以及监测单元显示出来";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.autodesk.com");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "ShowOldWModel_32.png")));
        }
예제 #29
0
        private void AddRibbonPanel(UIControlledApplication app)
        {
            RibbonPanel panel = app.CreateRibbonPanel("STF Exporter: v" + Assembly.GetExecutingAssembly().GetName().Version);

            PushButtonData pbd_STF      = new PushButtonData("STFExport", "Export STF File", assyPath, "STFExporter.Command");
            PushButton     pb_STFbutton = panel.AddItem(pbd_STF) as PushButton;

            pb_STFbutton.LargeImage      = iconImage("STFExporter.icons.stfexport_32.png");
            pb_STFbutton.ToolTip         = "Export Revit Spaces to STF File";
            pb_STFbutton.LongDescription = "Exports Spaces in Revit model to STF file for use in application such as DIALux";

            //ContextualHe/lp contextHelp = new ContextualHelp(ContextualHelpType.ChmFile, dir + "/Resources/STFExporter Help.htm");
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "https://github.com/kmorin/STF-Exporter");

            pb_STFbutton.SetContextualHelp(contextHelp);
        }
예제 #30
0
        /// <summary> 添加“关于”的按钮 </summary>
        private void AddPushButtonAbout(RibbonPanel panel)
        {
            // Create a new push button
            PushButton pushButton =
                panel.AddItem(new PushButtonData("About", "关于", Path.Combine(Path_Dlls, Dll_RibbonTab), "eZRvt.IECAbout"))
                as PushButton;

            // Set ToolTip
            pushButton.ToolTip = "关于信息";
            // Set Contextual help
            ContextualHelp contextHelp = new ContextualHelp(ContextualHelpType.Url, "http://www.autodesk.com");

            pushButton.SetContextualHelp(contextHelp);
            // Set Icon
            pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(Path_icons, "About_32.png")));
        }