<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Linking a Ribbon Button to a .Net Command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817284#M29130</link>
    <description>Thanks for your reminder &amp;amp; advice, are you suggesting me provide a separated CUI file to my users to load it when they need?</description>
    <pubDate>Wed, 28 Feb 2018 19:49:41 GMT</pubDate>
    <dc:creator>TiStars</dc:creator>
    <dc:date>2018-02-28T19:49:41Z</dc:date>
    <item>
      <title>Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7496777#M29113</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if anybody can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a few commands that I have created, and they work great if called via the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("MyCommand", CommandFlags.UsePickSet | CommandFlags.Redraw | CommandFlags.Modal)]
public void MyCommandFunction()
{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// MY CODE IS HERE
}&lt;/PRE&gt;&lt;P&gt;I have also created a new ribbon tab, with panel, and RibbonButton, and assigned a CommandHandler which calls a Action (callback function). However, I can't seem to get my button to trigger 'MyCommand'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RibbonCommandHandler ActionHandler = new RibbonCommandHandler();
ActionHandler.CallBack = CallBackFunction;
myButton.Id = "MyButtonID";
myButton.CommandHandler = ActionHandler;


public class RibbonCommandHandler : System.Windows.Input.ICommand
{
    public Action&amp;lt;String&amp;gt; CallBack;
    public event EventHandler CanExecuteChanged;

    public bool CanExecute(object parameter)
    {
        return true;
    }

    public void Execute(object parameter)
    {
        if (parameter is RibbonButton)
        {
            RibbonButton button = parameter as RibbonButton;
            CallBack(button.Id);
        }
    }
}


public void CallBackFunction(String message)
{
    Document doc = Application.DocumentManager.MdiActiveDocument;
            
    switch (message)
    {
        case "MyButtonID":
            // I AM STUCK HERE .....
            break;
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if I have failed to explain my problem very clearly. I am not sure if I am even going around the issue the right way. But any assistance to point me in the right direction would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 13:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7496777#M29113</guid>
      <dc:creator>JamesLH88</dc:creator>
      <dc:date>2017-10-27T13:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497197#M29114</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3162565"&gt;@JamesLH88&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if anybody can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a few commands that I have created, and they work great if called via the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("MyCommand", CommandFlags.UsePickSet | CommandFlags.Redraw | CommandFlags.Modal)]
public void MyCommandFunction()
{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// MY CODE IS HERE
}&lt;/PRE&gt;&lt;P&gt;I have also created a new ribbon tab, with panel, and RibbonButton, and assigned a CommandHandler which calls a Action (callback function). However, I can't seem to get my button to trigger 'MyCommand'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RibbonCommandHandler ActionHandler = new RibbonCommandHandler();
ActionHandler.CallBack = CallBackFunction;
myButton.Id = "MyButtonID";
myButton.CommandHandler = ActionHandler;


public class RibbonCommandHandler : System.Windows.Input.ICommand
{
    public Action&amp;lt;String&amp;gt; CallBack;
    public event EventHandler CanExecuteChanged;

    public bool CanExecute(object parameter)
    {
        return true;
    }

    public void Execute(object parameter)
    {
        if (parameter is RibbonButton)
        {
            RibbonButton button = parameter as RibbonButton;
            CallBack(button.Id);
        }
    }
}


public void CallBackFunction(String message)
{
    Document doc = Application.DocumentManager.MdiActiveDocument;
            
    switch (message)
    {
        case "MyButtonID":
            // I AM STUCK HERE .....
            break;
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies if I have failed to explain my problem very clearly. I am not sure if I am even going around the issue the right way. But any assistance to point me in the right direction would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Typically, you would&amp;nbsp;set the Macro property of the RibbonCommandButton in xaml, to the name of your command (.e.g, "MYCOMMAND"), and that's it. The RibbonCommandButton takes care of the rest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't have to implement ICommand unless you need to enable/disable the ability to use the command based on some runtime condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 15:34:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497197#M29114</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-10-27T15:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497470#M29115</link>
      <description>&lt;P&gt;I believe the OP's question is about RibbonButton (RibbonCommandItem) in Autodesk.Windows.Ribbon namespace (AdWindows.dll), where the OP dynamically creates/updates ribbon items, not RibbonCommandButton in Autodesk.AutoCAD.Ribbon namespace (AcWindows.dll).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To OP:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set RibbomCommandItem.CommandParameter to the custom command, and call Document.SendStringToExecution() in the command handler's Execute() method, something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;myButton.CommandParameter="MyCommand"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then in the command handler:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public void&amp;nbsp;Execute(object parameter)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;var ribbonItem=parameter As RibbomCommandItem;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;if (ribbonItem!=null)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var doc=ApplicationDocumentManager.MdiDocument&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;//Make sure the command text either ends with ";", or a " "&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; string cmdText=((string)ribbonItem.CommandParameter).Trim();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (!cmdText.EndsWith(";")) cmdText=cmdText + " ";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;doc.SendStringToExecite(cmdText, .....);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:10:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497470#M29115</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-10-27T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497548#M29116</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;I believe the OP's question is about RibbonButton (RibbonCommandItem) in Autodesk.Windows.Ribbon namespace (AdWindows.dll), where the OP dynamically creates/updates ribbon items, not RibbonCommandButton in Autodesk.AutoCAD.Ribbon namespace (AcWindows.dll).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Looking at it again more closely, you're right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if one only needs to execute a command when a button is pressed, then RibbonCommandButton (which is derived from RibbonCommandItem) is what they should use. &lt;STRONG&gt;&lt;EM&gt;It also provides for cancelling out any currently-active commands before executing the macro&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RibbonCommandItem is a lower-level type that is mostly useful in more specialized needs, which is not the case here.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:38:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497548#M29116</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-10-27T17:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497611#M29117</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3162565"&gt;@JamesLH88&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if anybody can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a few commands that I have created, and they work great if called via the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also created a new ribbon tab, with panel, and RibbonButton, and assigned a CommandHandler which calls a Action (callback function). However, I can't seem to get my button to trigger 'MyCommand'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unless you have more-specialized needs or just want to learn, the &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREFNET-Autodesk_AutoCAD_Customization_RibbonCommandButton" target="_blank"&gt;RibbonCommandButton &lt;/A&gt;&lt;/STRONG&gt;&lt;/FONT&gt;is the easiest way to execute a command in response to a button click.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only requires you to set the Macro property to the command string to be executed, and nothing else.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 18:02:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7497611#M29117</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-10-27T18:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7501158#M29118</link>
      <description>&lt;P&gt;Thanks everyone for your help, I have managed to get it working now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My only problem now is, how can I cancel any currently active commands, before executing my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen that previous methods (chr(27) and ^C) are no longer supported?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 10:41:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7501158#M29118</guid>
      <dc:creator>JamesLH88</dc:creator>
      <dc:date>2017-10-30T10:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7501873#M29119</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3162565"&gt;@JamesLH88&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Thanks everyone for your help, I have managed to get it working now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My only problem now is, how can I cancel any currently active commands, before executing my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen that previous methods (chr(27) and ^C) are no longer supported?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To place a button on the ribbon that executes an AutoCAD command when the user clicks on the button, you only need to do this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;   // Create an instance of a RibbonCommandButton that
   // when clicked, will cancel out any currently-running
   // command, and then execute the command "MYCOMMAND"
   
   RibbonCommandButton button = new RibbonCommandButton();
   button.Id = "ID_MYBUTTON1";
   button.Name = "MyRibbonCommandButton1";
   button.Text = button.Name;
   button.ShowText = true;
   button.Macro = "^c^cMYCOMMAND";&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's all that's needed. For your purposes, there is no absolutely need to provide a separate command handler that implements ICommand, because the RibbonCommandButton acts as its own command handler,&amp;nbsp;internally does what has to be done to execute the command, and it provides for the means to cancel out any currently-running command by just prefixing the macro with ^C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if for whatever reason, you want or need&amp;nbsp;to use SendStringToExecute(), then this should cancel out a running command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;   string cmd = string.Format("{0}{1}", new string((char) 03, 2), "MYCOMMAND");
   doc.SendStringToExecute(cmd, true, false, true);&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 15:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7501873#M29119</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-10-30T15:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7811049#M29120</link>
      <description>Since it was a post of 4 months ago, I don't know if you solved it or not, but I had same problem and I got a solution here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2012/07/start-command-with-escape-characters-cc.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/07/start-command-with-escape-characters-cc.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;instead of ^C, he used '\x03', and got a piece of code to help do it.&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Tue, 27 Feb 2018 01:04:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7811049#M29120</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-27T01:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7812841#M29121</link>
      <description>&lt;P&gt;^C is for use in the RibbonCommandButton's Macro property only, not with SendStringToExecute().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code from above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;string.Format("{0}{1}", new string((char) 03, 2), "MYCOMMAND");&lt;/PRE&gt;&lt;P&gt;produces the the same result as '\x03' + '\x03'. It's just a different way of doing it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 15:38:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7812841#M29121</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-27T15:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7813526#M29122</link>
      <description>Thanks, I tried your code, it runs good as well.&lt;BR /&gt;&lt;BR /&gt;Actually, I am going to create a Ribbon Button for my Addins, I found there are so many ways to do it according to the information I got from forum, old or new, I just got confused to know one is the best way or official way recommended by AutoDesk to do it.</description>
      <pubDate>Tue, 27 Feb 2018 19:37:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7813526#M29122</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-27T19:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7813985#M29123</link>
      <description>&lt;P&gt;IMO, the correct way to do it, is not to get involved at all with ribbon UI elements, and just provide a partial CUI file with buttons that execute your commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Commands should be accessible via any means, not just via a ribbon button (e..g, pulldown/context menu, keyboard shortcuts, etc.).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The official and correct way to achieve that is to simply use the CUI, rather than tying your command to some specific interface or access method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4185290"&gt;@TiStars&lt;/a&gt; wrote:&lt;BR /&gt;Thanks, I tried your code, it runs good as well.&lt;BR /&gt;&lt;BR /&gt;Actually, I am going to create a Ribbon Button for my Addins, I found there are so many ways to do it according to the information I got from forum, old or new, I just got confused to know one is the best way or official way recommended by AutoDesk to do it.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:04:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7813985#M29123</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-27T22:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814240#M29124</link>
      <description>&lt;P&gt;Yes, I would like to implement what you said, access commands from all kinds of route.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, I will search some document/information about CUI file, but seems AutoDesk provides limited Doc for that.&lt;BR /&gt;&lt;BR /&gt;I like .NET reference of Civil 3D very much as it has been make very well. Organized and enough explanation, examples, etc&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 00:21:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814240#M29124</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-28T00:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814382#M29125</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4185290"&gt;@TiStars&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Yes, I would like to implement what you said, access commands from all kinds of route.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, I will search some document/information about CUI file, but seems AutoDesk provides limited Doc for that.&lt;BR /&gt;&lt;BR /&gt;I like .NET reference of Civil 3D very much as it has been make very well. Organized and enough explanation, examples, etc&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You don't need docs on the CUI file format. AutoCAD reads and writes it. You only need to use the CUI command to create a partial CUI file that contains your buttons, etc, and give that to the end user or include it in your bundle.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:46:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814382#M29125</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-28T01:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814402#M29126</link>
      <description>To end user, even 1 more step will be great challenge since they got a DLL to netload and manual to read, tutorial videos to watch etc..&lt;BR /&gt;&lt;BR /&gt;I'm afraid giving end user CUI file will be the last option.&lt;BR /&gt;&lt;BR /&gt;My target will be one file like setup.exe, simply click&amp;amp;run, end user will get everything shown up in his Civil 3D.&lt;BR /&gt;&lt;BR /&gt;Anyway, I would like to learn CUI file to see if I can do something with it.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 28 Feb 2018 02:06:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7814402#M29126</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-28T02:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7816036#M29127</link>
      <description>&lt;P&gt;A partial .CUI file is just another type of file that you can include in your deployment package/bundle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user doesn't have to do anything with it. Your installer or your app (on first run) can load the partial .CUI file making its contents available., so there is nothing required on the part of the end-user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:19:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7816036#M29127</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-02-28T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7816398#M29128</link>
      <description>&lt;P&gt;"Everything showing up" is the problem though.&amp;nbsp; One of the more aggravating problems with plugins are those which *insist* on populating Ribbon content regardless of workspace, profile, or other settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please consider that your&amp;nbsp;users may not be using your tools all the time, so providing a CUIx will allow them to create workspaces to show it when they need it and hide it when they don't.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:45:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7816398#M29128</guid>
      <dc:creator>dgorsman</dc:creator>
      <dc:date>2018-02-28T15:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817264#M29129</link>
      <description>That seems exactly what i want, Thank you very much.&lt;BR /&gt;I am reading articles about CUI file from here step by step:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.cad-notes.com/exploring-autocad-cui-introduction-1/" target="_blank"&gt;https://www.cad-notes.com/exploring-autocad-cui-introduction-1/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I haven't finished it yet ,but I think it doesn't include how to put CUI file into depoyment package/bundle. I will do some research about this later.</description>
      <pubDate>Wed, 28 Feb 2018 19:45:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817264#M29129</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-28T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817284#M29130</link>
      <description>Thanks for your reminder &amp;amp; advice, are you suggesting me provide a separated CUI file to my users to load it when they need?</description>
      <pubDate>Wed, 28 Feb 2018 19:49:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817284#M29130</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-28T19:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817487#M29131</link>
      <description>&lt;P&gt;If you have the time, I would suggest providing several options.&amp;nbsp; The first would be the "dirt simple" way you were looking at, where it&amp;nbsp;does&amp;nbsp;a partial load of the CUIx file for them.&amp;nbsp; The other would be to let the users do the loading themselves e.g. partial to the Enterprise CUIx file.&amp;nbsp; Include some basic documentation about how to partially load your CUIx (although that should just be a rehash to most AutoCAD/Civil3D users by now).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either way, let them add and arrange panels in the workspace for themselves.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 20:48:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817487#M29131</guid>
      <dc:creator>dgorsman</dc:creator>
      <dc:date>2018-02-28T20:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linking a Ribbon Button to a .Net Command</title>
      <link>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817737#M29132</link>
      <description>Thank you for your suggestions , I would like to try "dirt simple" way at this stage, but I think I should think about the other option you mentioned when my user have been familiar with how to netload my DLLs and use them at first.</description>
      <pubDate>Wed, 28 Feb 2018 21:58:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/linking-a-ribbon-button-to-a-net-command/m-p/7817737#M29132</guid>
      <dc:creator>TiStars</dc:creator>
      <dc:date>2018-02-28T21:58:46Z</dc:date>
    </item>
  </channel>
</rss>

