I need to turn off or over-ride the built-in behavior of the Ribbon in Civil 3D. Toggle to Paperspace and the "Layout" tab becomes active (which is annoying to manually toggle back to the home tab). I created a LISP reactor to create an event handler to toggle the ribbon back to the home tab but it chokes on the "+ribbon" command:
(command-S "+ribbon" "CIVIL.ID_Civil3DHome") <-- this works when pasting the code to the command line
I then created a .NET event handler to toggle back to the hometab similar to this which works:
<code>
Private _lm As LayoutManager = LayoutManager.Current
AddHandler _lm.LayoutSwitched, AddressOf onLayoutSwitched
' onLayoutSwitched calls the following:
Public Shared Sub RestoreHomeTab()
Dim rc As RibbonControl = ComponentManager.Ribbon
Dim tab As RibbonTab = rc.FindTab("CIVIL.ID_Civil3DHome")
If tab IsNot Nothing Then
tab.IsActive = True
End If
End Sub
<\code>
The problem is that after the layout is switched by the user my event activates the hometab as planned BUT then is toggled back to the Layout tab by the built-in behavior if Paperspace is current. How do I fire my event "after" the built-in behavior or just turn off the built-in behavior without needing an event handler in the first place? I could test to see if Paperspace is current but I suspect the built-in behavior will still execute after my event.
What about one of these non-programming solutions?