.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Civil 3D Ribbon Active Tab changes for Paper/Model space toggle

1 REPLY 1
Reply
Message 1 of 2
staryknite
341 Views, 1 Reply

Civil 3D Ribbon Active Tab changes for Paper/Model space toggle

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. 

 

 

1 REPLY 1
Message 2 of 2

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost