Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Show/Hide Ribbon Buttons depending on Project or Family Editor

3 REPLIES 3
Reply
Message 1 of 4
RickyBell
657 Views, 3 Replies

Show/Hide Ribbon Buttons depending on Project or Family Editor

I'm using this code to create a ribbon panel and place some buttons on it.

 

RibbonPanel ribbonPanel = application.CreateRibbonPanel(firstPanelName);

PushButtonData buttonData = new PushButtonData(... etc..

 

Is there a way to change the visibility of button based on if you're in a project view or the family editor?  I have different tools specific to both views and I'd like to prevent the user from running a family tool on a project.

 

Any help is appreciated, Thanks!

3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: RickyBell
Message 3 of 4
RickyBell
in reply to: jeremytammik

Thanks!  That definitely pointed me in the right direction.  It seems that all the samples I'm finding are triggered by what you have selected or by what version of Revit you're using.  They work just fine.  Is there a way to have it look for Project vs. Family Editor for the trigger?

Message 4 of 4
jeremytammik
in reply to: RickyBell

You ciould try the Document.OwnerFamily property:

 

http://revitapisearch.com/html/95b303dc-1569-492d-6863-fbe49f6189b0.htm

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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


Rail Community