CommandBinding & PostCommand

CommandBinding & PostCommand

kderoller
Observer Observer
603 Views
1 Reply
Message 1 of 2

CommandBinding & PostCommand

kderoller
Observer
Observer

All,

 

New to the forum and API.

 

I am looking for a solution to disable a revit command (New Project) and replace it with my own external command.

 

I have the IExternalCommand working as desired via a custom ribbon and button. I was also able to access it via the PostCommand and I am also able to disable the current revit command via AddInCommandBinding. However the SDK examples I could find only show using the Executed event to display a Dialog box. How do I execute my external command when the default button is pressed? 

 

@Anonymous 

0 Likes
604 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

Welcome to the Revit API.

 

Glad to hear you have your own command up and running already.

 

Here is the functionality to use to replace a built-in command:

 

https://thebuildingcoder.typepad.com/blog/2013/03/whats-new-in-the-revit-2013-api.html

  

> Replace implementation of commands

  

See also:

 

https://thebuildingcoder.typepad.com/blog/2013/04/the-revit-2014-pre-release-api-and-sdk.html#4

  

An example:

 

https://thebuildingcoder.typepad.com/blog/2012/06/replacing-built-in-commands-and-their-ids.html

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes