Macro Editor Python Add-in

Macro Editor Python Add-in

Anonymous
Not applicable
846 Views
1 Reply
Message 1 of 2

Macro Editor Python Add-in

Anonymous
Not applicable

Hello!

My goal is to create a Revit Add-in using Macro Manager with python. It has very clear example and works fine but i failed to implement Ribbon button as in c#.

I used simple C# example to start with:  youtu.be/KHMwd4U_Lrs

I understand that i need Execute methode in the python script something like this:

 

		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            myMacro(commandData.Application.ActiveUIDocument);
            return Result.Succeeded;
        }

 

Cant find any inforamtion in web, can anyone please help with code sample?  Both ribbon and script

P.S. I know about pyrevit

 

0 Likes
Accepted solutions (1)
847 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Welcome to the Revit API!

 

Many people have put in a lot of effort to create such tutorials for you, and large amounts of other getting started material:

 

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

 

Please work through that material first on your own before you ask any questions.

 

Then all will become clear!

  

That will save both you and your peers thousands of hours of time in the long run.

 



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

0 Likes