public void CreateCustomRibbonItems()
 {
     ClearRibbonItems();
     var newTab       = new Eplan.EplApi.Gui.RibbonBar().AddTab(_newTabName);
     var commandGroup = newTab.AddCommandGroup(_commandGroupName);
     var command      = commandGroup.AddCommand(_commandName, "CustomActionForRibbonCommand");
 }
Example #2
0
        public void CreateCustomRibbonItems()
        {
            string _newTabName       = "Custom RibbonItems";
            string _commandGroupName = "Custom CommandGroup";
            string _commandName      = "Part Management Example";

            var newTab       = new Eplan.EplApi.Gui.RibbonBar().AddTab(_newTabName);
            var commandGroup = newTab.AddCommandGroup(_commandGroupName);
            var command      = commandGroup.AddCommand(_commandName, "XPartsManagementStart /PARAM:Script01_CreateCustomRibbonItems");
        }
Example #3
0
        public void registerItems()
        {
            cleanItems();
            var newTab = new Eplan.EplApi.Gui.RibbonBar().AddTab(m_newTabName);

            var vAllEnumValues       = Enum.GetValues(typeof(Eplan.EplApi.Gui.CommandIcon)).Cast <Eplan.EplApi.Gui.CommandIcon>();
            int nCounterButtons      = 0;
            int nCounterButtonGroups = 0;

            Eplan.EplApi.Gui.RibbonCommandGroup commandGroup = null;

            foreach (var value in vAllEnumValues)
            {
                if ((nCounterButtons % m_ButtonsPerGroup) == 0)
                {
                    commandGroup = newTab.AddCommandGroup(m_commandGroupName + nCounterButtonGroups.ToString());
                    nCounterButtonGroups++;
                }
                commandGroup.AddCommand(value.ToString(), "XPartsManagementStart /PARAM:" + (nCounterButtons++).ToString(), value);
            }
        }