<?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: Programmatically select a ribbon command item from a ribbon split button in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/programmatically-select-a-ribbon-command-item-from-a-ribbon/m-p/8813798#M22323</link>
    <description>&lt;P&gt;I literally solved this right after I pressed send.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I needed to set the current property of the split button to the item I wanted to be current/visible:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rnbAppModeSplit.Current = CType(rnbAppModeSplit.Items.ToList().Find(Function(x) x.Id = RibbonKeys.NotSelectedSplitListButtonId), RibbonCommandItem)&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2019 19:00:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-24T19:00:41Z</dc:date>
    <item>
      <title>Programmatically select a ribbon command item from a ribbon split button</title>
      <link>https://forums.autodesk.com/t5/net-forum/programmatically-select-a-ribbon-command-item-from-a-ribbon/m-p/8813774#M22322</link>
      <description>&lt;P&gt;On a custom ribbon created programmatically with .net:&amp;nbsp; When a user runs a certain command, I want to change the selected/current (i.e. visible) ribbon command items on a ribbon split button. I cannot find any tool in the API for programmatically setting which of the command items shows as current, however. Hopefully, I'm just missing it and it's there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried IsVisible, IsChecked, and IsActive on the ribbon command item that I want to be shown as current, but none work. Here's my code (it's vb.net) in case it's helpful (note that I use linq to access the command item):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim rnbAppModeSplit As RibbonSplitButton = AcadRibbonService.GetRibbonSplitButton(rbnAppModePanel, RibbonKeys.AppModeSplitButtonId)&lt;BR /&gt;CType(rnbAppModeSplit.Items.ToList().Find(Function(x) x.Id = RibbonKeys.NotSelectedSplitListButtonId), RibbonCommandItem).IsVisible = True&lt;BR /&gt;CType(rnbAppModeSplit.Items.ToList().Find(Function(x) x.Id = RibbonKeys.NotSelectedSplitListButtonId), RibbonCommandItem).IsActive = True&lt;/P&gt;&lt;P&gt;CType(rnbAppModeSplit.Items.ToList().Find(Function(x) x.Id = RibbonKeys.NotSelectedSplitListButtonId), RibbonCommandItem).IsChecked = True&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 18:47:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programmatically-select-a-ribbon-command-item-from-a-ribbon/m-p/8813774#M22322</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-24T18:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically select a ribbon command item from a ribbon split button</title>
      <link>https://forums.autodesk.com/t5/net-forum/programmatically-select-a-ribbon-command-item-from-a-ribbon/m-p/8813798#M22323</link>
      <description>&lt;P&gt;I literally solved this right after I pressed send.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I needed to set the current property of the split button to the item I wanted to be current/visible:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rnbAppModeSplit.Current = CType(rnbAppModeSplit.Items.ToList().Find(Function(x) x.Id = RibbonKeys.NotSelectedSplitListButtonId), RibbonCommandItem)&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 19:00:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programmatically-select-a-ribbon-command-item-from-a-ribbon/m-p/8813798#M22323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-24T19:00:41Z</dc:date>
    </item>
  </channel>
</rss>

