Revit 2025 - Macro Manager and Visual Studio 2022

Revit 2025 - Macro Manager and Visual Studio 2022

ricaun
Advisor Advisor
3,509 Views
9 Replies
Message 1 of 10

Revit 2025 - Macro Manager and Visual Studio 2022

ricaun
Advisor
Advisor

The Macro Manager changed in Revit 2025, now you need to have .NET SDK 8.0 and Visual Studio Code installed on your machine to create and build the macro in C#.

 

I found a way to use Visual Studio 2022 (which should also work with Rider) instead of using Visual Studio Code.

 

 

You need to change the configuration in the Macro Manager and add a custom code.cmd (https://gist.github.com/ricaun/482edc40d2b680ab733e12492264fd0d).

 

Macro_-_Config.png

 

The code.cmd file finds the .csproj in the folder and tries to open it.

 

This should work without Visual Studio Code installed on the machine. 😁

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

3,510 Views
9 Replies
Replies (9)
Message 2 of 10

ankofl
Advocate
Advocate

Oh! Perfectly!

Thank you very much!

0 Likes
Message 3 of 10

rawava1350
Explorer
Explorer

Great, wish this was the default, with no restrictions on IDE usage. Not every developer likes VS Code

0 Likes
Message 4 of 10

jeremy_tammik
Alumni
Alumni

Congratulations on discovering this and thank you for sharing! I added it to today's blog post:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 10

josborneW959Y
Contributor
Contributor

Cool! Is there any way to get the extension to enable debugging?

0 Likes
Message 6 of 10

ricaun
Advisor
Advisor

@josborneW959Y wrote:

Cool! Is there any way to get the extension to enable debugging?


Sure: https://github.com/ricaun-io/RevitAddin.VisualStudioDebug

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 7 of 10

Eduardo.SaezDRTV4
Participant
Participant

So from Revit 2025 coding has to be in C#, there is no way to code in VB or Python ?

0 Likes
Message 8 of 10

jeremy_tammik
Alumni
Alumni

So from Revit 2025 coding has to be in C#

  

No. The Revit API is based on .NET.

  

> there is no way to code in VB or Python ?

  

You can use any language that can connect appropriately to the Revit .NET API framework.

  

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

Eduardo.SaezDRTV4
Participant
Participant

Thought so, just wanted to confirm.
So guess I need start learning C# then and quickly

Thanks Jeremy

0 Likes