add revit buttons to new addin

Anonymous

add revit buttons to new addin

Anonymous
Not applicable

Hi, this I suppose is a very novate question but don't find code in C# about it,

 

I'd like to add button like "link cad" "link revit" or export > "Cad formats" to an addin, this way make easy to me access to this functionality.

 

I appreciate any help, tnx!

 

Something like the image attach.

 

 

0 Likes
Reply
Accepted solutions (1)
3,648 Views
8 Replies
Replies (8)

Anonymous
Not applicable
0 Likes

Anonymous
Not applicable

Hi, tnx for answer, but I already do that in a custom tab, what Id like to do is: add actually revit button in my tab,not create a custom button for custom functionality.

 

or if I need to add a custom button, there is some code, to make exactly the same actions of the button?, i mean, for example:
if you click: Insert> link revit.
then call file chooser and when select file, and link it when accept

 


Regards!

Regards!

0 Likes

MarryTookMyCoffe
Collaborator
Collaborator

http://archi-lab.net/create-your-own-tab-and-buttons-in-revit/

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
0 Likes

Anonymous
Not applicable

Hi! tnx for answer, but I already can add custom buttons and tabs, but I'd like to add to add the button that already exist in Revit inside my custom tab.

 

I've seen some tutorials where I can add custom buttons to existing tabs, I want to do the otherwise, add existing buttons to custom tab.

 

I attached an image with the idea

 

Regards!

0 Likes

MarryTookMyCoffe
Collaborator
Collaborator

you can try using :

  • AdWindows.dll
  • UIFramework.dll
    read about it more here:

http://thebuildingcoder.typepad.com/blog/2011/02/pimp-my-autocad-or-revit-ribbon.html

with that you should get accesses to a default tabs and ribbons.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
0 Likes

FAIR59
Advisor
Advisor
0 Likes

Anonymous
Not applicable
Accepted solution

I would just have the push button run a PostCommand.  Here is something I use to run the sync button command from my button on my tab in the Ribbon.  I use it to control who is syncing by creating a sync queue and when the model is available it run the sync for the user.   

 

RevitCommandId syncCmdId = RevitCommandId.LookupPostableCommandId(PostableCommand.SynchronizeAndModifySettings);
 
uiapp.PostCommand( syncCmdId );

 

 

Anonymous
Not applicable

hi
i'm already make a Tab and Button, but i want give Action to Button, like i want to make it open CMD after press on it, i'm already have another project using C# able me to open CMD so how can i connect them by each other , how can make this button active to open another project or specific CMD ?????????

0 Likes