« Simple MEP System Traversal | Main | MP3 Manipulation Using Python, Mutagen and Ffmpeg »

February 07, 2013

Comments

Hi Jeremy, hi Eduardo,

when the button is invoked, you could subsribe to OnIdling event to gain access to the Revit database.

Button disabled: as far as I know, we need to set the AvailabilityClassName property of the RibbonButton...
Ah, I see that Autodesk.Windows.RibbonButton class differs from Autodesk.Revit.UI.RibbonButton class.

Since you are using the first one, there is no AvailabilityClassName property on your button object.

Instead of this, I think there is some sort of "command binding" which manages the visibility.
I just looked over Kean's blog postings but did not found related entries so far.

Since we can get the adWin.RibbonButton from the Revit.UI.RibbonButton via Reflection, there might be a way to cast the first into the second.

Sorry for providing just ideas and suggestions, but maybe that may help you nontheless.


Cheers,
Rudolf

This will only work on Revit 2014.

Hi Jeremy

I have been creating various add-ins for Revit and have managed to create a custom Ribbon tab on which to place all the commands/icons.

What I would like to do, but cannot find any information on how to achieve it is to add an existing in-built Revit command onto my custom Ribbon. I want to add the "Modify" command as the first item on my Ribbon.

many thanks
Paul

Dear Paul,

You can create a new custom external command of your own, just like usual.

Within it, you can invoke the existing Revit built-in command using the PostCommand functionality:

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.3

Cheers, Jeremy.

I installed the DockableDialogs example from Revit 2015 SDK and the "Register Page" button is disabled like the button in this post? Any idea why?

Class ExternalCommandRegisterPage implements IExternalCommandAvailability which has an IsCommandAvailable method. The implementation forces you to register the dialog when a document isn't loaded.

Dear ZydecoDigital,

Ours is not to wonder why, ours is but to do or die.

Do you have it working now?

Cheers, Jeremy.

Dear Jeremy
thanks you for this valuable blogger
i have problem don't know how to solve

i'm creating two different applications for revit
they both should use the same ribbon and tab
how can i do that
please help in this issue

is this article help???

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource