Loading macro failed error.

Loading macro failed error.

recepagah12
Advocate Advocate
2,411 Views
5 Replies
Message 1 of 6

Loading macro failed error.

recepagah12
Advocate
Advocate
Loading the macro failed. Rebuilding the module may resolve this issue.

 

When i first create a module, i can't add a macro to it. I can edit the module and build. Also Revit is saying build the mdoule is succesful but neverthless i can't add macro or run the module-macro.

0 Likes
Accepted solutions (1)
2,412 Views
5 Replies
Replies (5)
Message 2 of 6

FAIR59
Advisor
Advisor

Check your macro security settings.

macro_security.JPGmacro_security2.JPG

0 Likes
Message 3 of 6

recepagah12
Advocate
Advocate
I alread did this. I need another solution. I create module but can't add macro or run it. Do i install again?
0 Likes
Message 4 of 6

stever66
Advisor
Advisor
Accepted solution

You won't be able to run anything until you have successfully created and built a macro.  Make sure the module is selected when you press the macro button.

 

you can also add a macro manually.  Inside the edit window for the module, right before the last }, type:

 

public void MyMacro()

{

Your macro code goes here.....

}

0 Likes
Message 5 of 6

recepagah12
Advocate
Advocate
I will try what you said. Nevertheless, there is doubt in my mind. Because, when i add module and select it, still the macro adding button is offline. I hope your way will help me. Thanks.
0 Likes
Message 6 of 6

stever66
Advisor
Advisor

Hopefully that worked since you marked it as solved.

 

If not, you could always start a new Module, and start a new Macro in that Module.  Then build it before adding any other code.  It should build without any problems.

 

Then add your code.  If it won't build after that, its something wrong with your code.

 

0 Likes