Revit API

Reply
Contributor
mohammadarslan
Posts: 12
Registered: ‎06-29-2012
Message 1 of 4 (204 Views)

Adding events to Buttons in Ribbon Panel

204 Views, 3 Replies
10-04-2012 02:22 AM

 

Hello , I am have created Push Button in Ribbon Panel. When this button is clicked it should display data to user which is stored in MS ACCESS / SQL Express. Can anyone please tell me, how will it be ? 

 

 

 

pushButton = splitButton.AddPushButton(new PushButtonData(" Datapush", " Data", AddInPath, "Revit.SDK.Samples.Ribbon.CS.Command"));

 

pushButton.LargeImage = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "image.png"), UriKind.Absolute));


pushButton.Image = new BitmapImage(new Uri(Path.Combine(ButtonIconsFolder, "image.png"), UriKind.Absolute));

 

 

 

ADN Support Specialist
jeremytammik
Posts: 657
Registered: ‎08-20-2007
Message 2 of 4 (184 Views)

Re: Adding events to Buttons in Ribbon Panel

10-09-2012 03:50 AM in reply to: mohammadarslan

Please look for samples on The Building Coder blog. They are legion.



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

New Member
faris.arch
Posts: 2
Registered: ‎11-15-2011
Message 3 of 4 (49 Views)

Re: Adding events to Buttons in Ribbon Panel

10-14-2014 11:31 AM in reply to: jeremytammik
hi,
is there a CommandHandler for revit pushbutton?
ADN Support Specialist
jeremytammik
Posts: 657
Registered: ‎08-20-2007
Message 4 of 4 (42 Views)

Re: Adding events to Buttons in Ribbon Panel

10-14-2014 12:56 PM in reply to: faris.arch

Yes, IExternalCommand.

 

Please refer to the Revit API getting started material:

 

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

 

Best regards

 

Jeremy



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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.