.NET

Reply
Valued Contributor
mnav
Posts: 57
Registered: ‎12-15-2009
Message 1 of 5 (382 Views)
Accepted Solution

Running Macro from Ribbon button

382 Views, 4 Replies
06-21-2012 08:03 AM

Hi

I have created a ribbonbar in autocad 2012 using API and  c#.

On ribbon button i am executing a Command method which display a wizard for copying some files.

now i want to run a macro before excuting the ribbon button command methood.

which display a messagebox with yes and no 

if user click yes command method will excutes itself and display wizard for copy files

if user click no command method will not execute and return.

 

this will allow user to use macro for customizing the file copy process.

 

can some body help how i can achive this.

 

thanks a lot.

 

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 2 of 5 (375 Views)

Re: Running Macro from Ribbon button

06-21-2012 09:45 AM in reply to: mnav

Here's some info on prompting the user.

Valued Contributor
mnav
Posts: 57
Registered: ‎12-15-2009
Message 3 of 5 (362 Views)

Re: Running Macro from Ribbon button

06-21-2012 12:31 PM in reply to: mnav

thanks for your reply but i want to run a macro not the editor prompt.  i want to run a macro which decide to continue with command of abort it.

 

any help how to run and macro from ribbon button and abort button command if you dont want to continue.#

 

thanks

 

Valued Contributor
mnav
Posts: 57
Registered: ‎12-15-2009
Message 4 of 5 (347 Views)

Re: Running Macro from Ribbon button

06-22-2012 01:16 AM in reply to: mnav

Got it..... here is the code if somebody looking for it

 

AcadApplication.RunMacro(@"C:\Test\AutocadVBA\NavTest.dvb!Module1.navTest");

 

thanks

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 5 of 5 (327 Views)

Re: Running Macro from Ribbon button

06-25-2012 07:23 AM in reply to: mnav

Sorry, I misunderstood what you wanted. Your question sounded like you wanted the menu macro to prompt the user. You didn't ask on how to run a vba macro.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.