.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Ribbon load at startup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi there,
I have been using the ribbon api to create my custom ribbon. I am
now attempting to load said rribbon at startup by placing the load
command into the initialize componant. It isn't working.
Does any on have any ideas?
Dim ribCntrl As Autodesk.Windows.RibbonControl = Autodesk.Windows.ComponentManager.Ribbon
If ComponentManager.Ribbon Is Nothing Then
Return
End If
For i As Integer = 0 To ribCntrl.Tabs.Count - 1
If ribCntrl.Tabs(i).Id.Equals("My_Rib_ID") Then
Return
End If
Next
'add the tab
Dim ribTab As New RibbonTab()
ribTab.Title = "My New ribbon
ribTab.Id = "My_Rib_ID"
ribCntrl.Tabs.Add(ribTab)
'create and add the panels
addPanel1(ribTab)
addPanel2(ribTab)
addPanel3(ribTab)
addPanel4(ribTab)
addPanel5(ribTab)
addPanel6(ribTab)
addPanel7(ribTab)
'set as active tab
ribTab.IsActive = True
I seem to remember being told it's because the ribbon .dll hasn't yet started
at this point sso it has nothing to use to load it?
Any help would be appreciated.
Ta,
Maritn.
Re: Ribbon load at startup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If the ribbon isn't loaded when your plug-in loads, you shouldn't try to load it.
When your plug-in loads, if it doesn't find the ribbon loaded, then you should add a handler to the RibbonService's RibbonPaletteSetCreated event. When the user activates the ribbon, your handler will be called and you can add your stuff then.
Re: Ribbon load at startup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
the ribben itself loads fine with the above code. But loading at startup ecapes me.
I can't seem to work it out?
Re: Ribbon load at startup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Martin,
Have you tried using the “Autodesk.Windows.ComponentManager.ItemInitial
http://forums.autodesk.com/t5/NET/Autoloader-probl
Balaji
Developer Technical Services
Autodesk Developer Network
