Add button to existing ribbon panel

Add button to existing ribbon panel

Anonymous
Not applicable
7,290 Views
23 Replies
Message 1 of 24

Add button to existing ribbon panel

Anonymous
Not applicable

I have followed this post by Jeremy Tammik on how to add a button to an existing ribbon panel, but I am facing the same problem: the button is added but it's disabled. Not much use for a button when you can't click on it!

 

http://thebuildingcoder.typepad.com/blog/2013/02/adding-a-button-to-existing-ribbon-panel.html

 

Right now, I am creating my own ribbon, adding panels to it and adding two buttons. But I don't want to create a whole new ribbon for just two buttons. I would like to add my buttons to the "Architecture" ribbon (which is called "build_rac" internally). The way I have implemented my Addin right now it's using the "commandData As Autodesk.Revit.UI.ExternalCommandData" to communicate with Revit. With the example by Jeremy, there's no "commandData As Autodesk.Revit.UI.ExternalCommandData", so even if I do get my button enabled, I can't interact with Revit.

 

I am stunned why accessing the ribbon is this difficult!!!

 

Any help is appreciated!

0 Likes
7,291 Views
23 Replies
Replies (23)
Message 21 of 24

arnostlobel
Alumni
Alumni

Yes, it is a bit controversial indeed, I admit. It was not the very original plan, but there was a lot of push for external developers being able to add buttons to the Analyze ribbon. I do not remember all the details surrounding the decision, but I recall it was partly due to the fact that Revit itself was not feature rich as far as analysis goes; most of the functionality was expected to be external anyway, with a great deal coming from Robot, our then affiliated partner.

 

As for the supported/unsupported features, frankly, I would not really care that much. I myself hacked my way to AutoCAD (long time ago 🙂 because my then customers wanted me to. So I do understand what developers like you are coming from. However, there are “unsupported” and “Unsupported” ways. This one in particular can create headaches for us, because when external applications find they way to the Ribbon without Revit knowing about it. then when a crash happens (and there are always some), there will be no report of any such activity in the dump file and the journal. We will simply not be able to tell the user what happened. We always advise them to uninstall any external applications that might have, but it is not always as black and white, for some of the crashes (most of them that are caused by pursuing unsupported features) are rather random in nature.

 

Very sorry for the inconvenience.

 

Arnošt Löbel

Sr. Principal Engineer

Autodesk, Revit R&D 

Arnošt Löbel
0 Likes
Message 22 of 24

Anonymous
Not applicable

Arnošt,

 

Thanks for the explanation. As for making more ribbons available to developers by expanding te API...here's my +1

 

🙂

0 Likes
Message 23 of 24

Jaime_Alonso
Enthusiast
Enthusiast

This solved my headaches!!!

0 Likes
Message 24 of 24

Speed_CAD
Collaborator
Collaborator
Hi Teun_Ham,

I don't know if you fixed the disabled button problem, but the solution is in the IsCheckable property.
Mauricio Jorquera