Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit Macro Is Greyed Out

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
1548 Views, 8 Replies

Revit Macro Is Greyed Out

Hello,

 

I am using Revit 2021 but I am failing to create any Macros.

 

All my macro settings are Enabled.

 

Revit allows me to create a Module but once Module is created it doesn't allow Macros to be selected or created, the button is greyed out.

 

I get a sign next to the module name (As soon as it is created) and when I check the help page, it means: 

 

"Loading the macro failed. Rebuilding the module may resolve this issue." At that point I didn't even write a single code but I try to rebuilt but it made no difference.

 

I tried to delete the Macros folder under C:\ProgramData\Autodesk\Revit directory and restarted my computer and Revit multiple times but it didn't work.

 

Can you please help me on how to create a macro under a module on Revit 2021?

 

Thanks in advance.

Labels (2)
8 REPLIES 8
Message 2 of 9
naveen.kumar.t
in reply to: Anonymous

Hi @Anonymous ,

I think you opened Revit by launching the debugger (DEBUG-->Start External Program) and you are trying to create the macro.

In this case, the Revit is in debugging mode so you cannot create/build the solution. (i.e)You cannot build the macro solution.

I think that's why you are getting the error.

 

try to open Revit software manually (without visual studio debugger) and try to create the macro.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 9
Anonymous
in reply to: naveen.kumar.t

Thanks for your feedback, I manually open the Revit software from desktop so it isn’t open via debugging mode. Do you have any other suggestion to create macro? Or if you mean something else by saying opening manually can you please describe?

Thanks a lot.
Message 4 of 9
stever66
in reply to: Anonymous

I assume you have restarted your computer and Revit?

 

sometimes the macros have issues if the editor is open in more than one version of Revit.

 

Message 5 of 9
Anonymous
in reply to: stever66

Yes, I have restarted both my computer and Revit more than multiple times.

In every example I checked online; I can see that people can create macros after creating a module but for some reason macro button remains greyed out after creating the module.

I confirmed that all macros are enabled, I run as administrator to ensure there aren’t any user access related issues but I still get the same problem.

I also get the error I mentioned before as soon as module is created and it automaticaly opens up the editor, maybe this automatic opening of the editor is causing the problem? Could automatic opening of the editor (as soon as module is created) is the reason I can’t create macro, if it is the reason, how can I stop it from openning automaticaly?

Thanks a lot.
Message 6 of 9
naveen.kumar.t
in reply to: Anonymous

Hi @Anonymous ,

Which version of Revit are you using?

Are you using the student version?

Please check these below links

https://forums.autodesk.com/t5/revit-api-forum/loading-the-macro-failed-with-student-version/td-p/5643475 

 

https://forums.autodesk.com/t5/revit-api-forum/revit-2015-macro-problem/td-p/7898619 

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 7 of 9
Anonymous
in reply to: naveen.kumar.t

Hi again,
I tried on trial version of Revit 2021 but also fully purchased version of Revit 2021.
I have previously checked the links you mentioned; they have exactly the same problem as I do and it seemed like none of them managed to resolve. One of them switched from student to full version and it worked and I already tried on full version on my friend's laptop. For the other topic there seems to be no clear answer, I tried the same thing creating a macro manually but it didn't work.
It is a very strange situation, as soon as I click create a module it declares module needs to be rebuilt: "Loading the macro failed. Rebuilding the module may resolve this issue." At that point all macros are autogenerated by Revit how can it fail its own macro? This the part I struggle to understand. Due to this failure it never allows me to create a macro by myself.
What shall I do?
Thanks
Message 8 of 9
Coty.Corriea
in reply to: Anonymous

(Sorry it wont let me delete this)
I didn't realize I needed a module first before I could create macros 😕

Tags (1)
Message 9 of 9
sragan
in reply to: Coty.Corriea

Yes, you have to create a module, and then a macro.  You can have multiple macros within a module.

 

I just noticed the original poster was trying to create a document level macro (the macro resides in the Revit project file - Project2 in the original post.)

 

Most macros are application level macros, so you probably want to select that tab.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community