.NET

Reply
Active Contributor
makepeace1
Posts: 28
Registered: ‎01-31-2014
Message 1 of 5 (314 Views)

VB.NET Create Ribbon

314 Views, 4 Replies
03-13-2014 04:15 AM

Would somone be able to help me or give me an example

 

I am looking to create a ribbon with multiple tabs and then multiple pannels on them tabs

 

I have had a look online but cant find any examples of what i am looking for

*Expert Elite*
norman.yuan
Posts: 993
Registered: ‎04-27-2009
Message 2 of 5 (301 Views)

Re: VB.NET Create Ribbon

03-13-2014 06:20 AM in reply to: makepeace1

You can use either CUIx API or Runtime Ribbon API to create Ribbon in AutoCAD. The former is to programmatically manipulate CUIx to modify ribbon, while the latter is to create Ribbon outside CUIx.

 

There is an Autodesk University 2009 courseware on this topic (CP204-2), which explains how to use the 2 sets of API in depth. It can still be found on the Internet for download:

 

http://ebookbrowsee.net/au09-cp204-2-cuix-api-docx-d165859562

 

HTH.

Active Contributor
makepeace1
Posts: 28
Registered: ‎01-31-2014
Message 3 of 5 (287 Views)

Re: VB.NET Create Ribbon

03-13-2014 08:58 AM in reply to: makepeace1

Thanks

 

I have worked out how to create the ribbons and add the button's but now i need to create a split button

 

I have had a look round again but can only find how to do it in C# and not vb.net

 

This is part of the code i am using

 

    Private Sub addPanel1(ByVal ribTab As RibbonTab)
        'create the panel source
        Dim ribSourcePanel As New RibbonPanelSource()
        ribSourcePanel.Title = "StorPlanner"
        'now the panel
        Dim ribPanel As New RibbonPanel()
        ribPanel.Source = ribSourcePanel
        ribTab.Panels.Add(ribPanel) 
      
        Dim ribbonbutton4 As New RibbonButton()
        ribbonbutton4.Text = "Circle"
        ribbonbutton4.ShowText = False
        ribbonbutton4.CommandParameter = "CIRCLE "
        ribbonbutton4.ShowImage = True
        ribbonbutton4.CommandHandler = New AdskCommandHandler()

        Dim ribbonbutton5 As New RibbonButton()
        ribbonbutton5.Text = "DialogLauncher"
        ribbonbutton5.CommandParameter = "properties "
        ribbonbutton5.ShowText = True
        ribbonbutton5.ShowImage = True
        ribbonbutton5.CommandHandler = New AdskCommandHandler()

        'and add it to source
        ribSourcePanel.DialogLauncher = ribbonbutton5
        ribSourcePanel.Items.Add(ribbonbutton4)
        ribSourcePanel.Items.Add(New RibbonSeparator())
        ribSourcePanel.Items.Add(ribbonbutton5)
        ribSourcePanel.Items.Add(New RibbonSeparator())

  End Sub

 

Distinguished Contributor
quigs
Posts: 143
Registered: ‎09-30-2008
Message 4 of 5 (266 Views)

Re: VB.NET Create Ribbon

03-14-2014 01:05 AM in reply to: makepeace1
Active Contributor
makepeace1
Posts: 28
Registered: ‎01-31-2014
Message 5 of 5 (197 Views)

Re: VB.NET Create Ribbon

04-01-2014 07:53 AM in reply to: quigs

Has anyone got a VS Project that i could have to base mine on

 

I am looking to have multiple tabs with then multiple pannels per tab

 

and would want to do splits on some of the buttons and give them drop downs

 

i know its a big ask but if somone would be able to give me a copy of there project i would be verry greatful

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.