RobotStudio event

Can I create a button in my toolwindow ,the function of button is same to AutoPath button.

Hello

I'm developing in RobotStudio using C# .I add a "AutoPath" button in my toolwindow,I want the function of the button is same to AutoPath Button in the Home(Tabs)_Path Programmming(Groups).First I try to find the id of the button in the RobotStudio  API Reference ,but I cann't find it. 

Does anyone have an idea how i make my "AutoPath" button have the same function.

Best Answer

  • zhang
    zhang
    Answer ✓

    OK,thank you very munch.

    Regards,
    zhang

Answers

  • Below is an example of my addin written in C#,to attempt to simulate clicking the "AutoPath" button,but it not work.

    Unfortunately,when I click the "AutoPath"button in "Home"Tab,the button  losed efficacy that  Pop-up "AutoPath"dialog box. Does the software have a bug?

    [code]private void AutoPath_Click(object sender, EventArgs e)
            {

                CommandBarButton.FromID("AutoPath").Execute();
            }[code]

    Another question,Have anyone show me that where can I get the "RobotStudioIDSummary.html".

  • 可以告诉以下我怎么把button2事件设置成启动abb的RAPID程序吗
  • 可以告诉以下我怎么把button2事件设置成启动abb的RAPID程序吗?
  • Hi somenasty,

    我不知道你具体要用RAPID(Tabs)下面的什么功能。

    你可以参考一下下面的代码。如果你要实现这个功能,可以找到它的IDs,然后用formID[]methods,但是不是所有的button都有相应的IDs,我也没有找到这些button的IDs。

    [code]

    CommandBarControl commandBarControl = UIEnvironment.RibbonTabs["RAPID"].Groups["Controller"].Controls["RapidApplyMenu"];


                if (commandBarControl != null)
                {
                    ((CommandBarPopup)commandBarControl).ClickButton.ExecuteCommand += ClickButton_ExecuteCommand;
                    ((CommandBarButton)((CommandBarPopup)commandBarControl).Controls["RapidApplyAll"]).ExecuteCommand += ClickButton_ExecuteCommand;
                    ((CommandBarButton)((CommandBarPopup)commandBarControl).Controls["RapidModuleApply"]).ExecuteCommand += ClickButton_ExecuteCommand;

                }
                Logger.AddMessage(new LogMessage("ONload"));

    [code]

    Regards,
    zhang

  • DenisFR
    DenisFR ✭✭✭
    Hello,
    @zhang: did you get your code for Apply button working with SmartComponent?
    I can't.
    I code the same for mine (https://github.com/DenisFR/RSDrawGraphics) but this doesn't works.
    \RSDrawGraphics\RSDrawGraphics.cs:234

  • Hi DenisFR,

    This is the code you posted on the forum before. But I didn't test it before.Today I get the code for Apply button working with Add-in,it doesn't works.

    You can ask the others again.

    Regards,
    zhang

  • DenisFR
    DenisFR ✭✭✭
    zhang said:
    Today I get the code for Apply button working with Add-in,it doesn't works.
    Does it works or not?
    You can ask the others again.
    Yes, maybe @Henrik Berlin can answer me?