<?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: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3049040#M60637</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a sample project that loads a cuix file and then sets the tab as active. I have used the same code that you have shown for iterating through the tabs. It works ok for me.&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>Tue, 07 Jun 2011 08:46:11 GMT</pubDate>
    <dc:creator>Balaji_Ram</dc:creator>
    <dc:date>2011-06-07T08:46:11Z</dc:date>
    <item>
      <title>How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3046242#M60634</link>
      <description>&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2011 16:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3046242#M60634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-03T16:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3047480#M60635</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) To load / unload&amp;nbsp;a CUI file, you may use "acedCmd" using P/Invoke. Here is a sample code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[DllImport("acad.exe", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "acedCmd")]&lt;/P&gt;
&lt;P&gt;private static extern int acedCmd(System.IntPtr vlist);&lt;/P&gt;
&lt;P&gt;// ....&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ResultBuffer rb = new ResultBuffer();&lt;BR /&gt;ResultBuffer rb = new ResultBuffer();&lt;/P&gt;
&lt;P&gt;// RTSTR = 5005&lt;BR /&gt;rb.Add(new TypedValue(5005, "FILEDIA"));&lt;BR /&gt;rb.Add(new TypedValue(5005, "0"));&lt;BR /&gt;acedCmd(rb.UnmanagedObject);&lt;/P&gt;
&lt;P&gt;string cuiFileName = cs.CUIFileBaseName;&lt;/P&gt;
&lt;P&gt;//CUIUNLOAD&lt;BR /&gt;rb = new ResultBuffer();&lt;BR /&gt;rb.Add(new TypedValue(5005, "_CUIUNLOAD"));&lt;BR /&gt;rb.Add(new TypedValue(5005, cuiFileName));&lt;BR /&gt;acedCmd(rb.UnmanagedObject);&lt;/P&gt;
&lt;P&gt;//CUILOAD&lt;BR /&gt;rb = new ResultBuffer();&lt;BR /&gt;rb.Add(new TypedValue(5005, "_CUILOAD"));&lt;BR /&gt;rb.Add(new TypedValue(5005, cuiFileName));&lt;BR /&gt;acedCmd(rb.UnmanagedObject);&lt;/P&gt;
&lt;P&gt;//FILEDIA&lt;BR /&gt;rb = new ResultBuffer();&lt;BR /&gt;rb.Add(new TypedValue(5005, "FILEDIA"));&lt;BR /&gt;rb.Add(new TypedValue(5005, "1"));&lt;BR /&gt;acedCmd(rb.UnmanagedObject);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp;&amp;nbsp; To make a tab visible, you need to set the "ActiveTab" property of the Ribbon Control&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Autodesk.Windows.RibbonControl ribControl = Autodesk.Windows.ComponentManager.Ribbon;&lt;BR /&gt;ribControl.ActiveTab = &amp;lt;Set the tab here&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Balaji&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Developer Technical Services&lt;/P&gt;
&lt;P&gt;Autodesk Developer Network&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 03:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3047480#M60635</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2011-06-06T03:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3048484#M60636</link>
      <description>&lt;P&gt;Thank you for the response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get the cui loading working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intent is to load the CUIX file and then enable the Panels &amp;amp; Tabs from the CUIX file.&lt;/P&gt;&lt;P&gt;I'm having a problem enabling them, even when the CUIX file is loaded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Loop doesn't find the Ribbon tab when it's not visible in the collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I check the Tab and make it visible... then it's visible in the collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a little direction here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" title="SFR.jpg" align="center" src="http://forums.autodesk.com/t5/image/serverpage/image-id/8484i30FF3A8A8F43618D/image-size/large?v=mpbl-1&amp;amp;px=-1" alt="SFR.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; &amp;lt;CommandMethod("listrib")&amp;gt; _
Sub listrib()
        Dim i As Integer

        Dim ribcontrol As Autodesk.Windows.RibbonControl = Autodesk.Windows.ComponentManager.Ribbon
        Dim ribTab As Autodesk.Windows.RibbonTab

        For i = 0 To ribcontrol.Tabs.Count - 1
            With ribcontrol.Tabs
                ed.WriteMessage("Name: " &amp;amp; .Item(i).Name &amp;amp; " ID:" &amp;amp; .Item(i).Id &amp;amp; Environment.NewLine)
                If .Item(i).Name = "SFR Tab" Then
                    .Item(i).IsActive = True
                End If

            End With

        Next



    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 20:00:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3048484#M60636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-06T20:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3049040#M60637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a sample project that loads a cuix file and then sets the tab as active. I have used the same code that you have shown for iterating through the tabs. It works ok for me.&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>Tue, 07 Jun 2011 08:46:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3049040#M60637</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2011-06-07T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3049880#M60638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I re-installed Autocad yesterday because it was giving me strange errors and the default profile became corrupted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This morning I tried your Example Solution and it worked seamlessly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the Help. Problem solved.&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>Tue, 07 Jun 2011 17:06:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/3049880#M60638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-07T17:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load CUI File (Ribbon Tabs) And Make Visible via .NET?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/5100048#M60639</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;open autocad 2013 and states that CUI files are found. how do retrieve CUIfiles to impport into autocad&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How do I Load CUI File (Ribbon Tabs) And Make Visible via .NET?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to load a cui file, I know how to make a Ribbon... but how do I load a CUI file and then make the ribbon visible via code?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.NET Code or Refernce to the correct objects and properties would sure help.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2014 15:34:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-load-cui-file-ribbon-tabs-and-make-visible-via-net/m-p/5100048#M60639</guid>
      <dc:creator>dcassara</dc:creator>
      <dc:date>2014-06-17T15:34:40Z</dc:date>
    </item>
  </channel>
</rss>

