Exporting/Importing application macros

Exporting/Importing application macros

Anonymous
Not applicable
2,727 Views
4 Replies
Message 1 of 5

Exporting/Importing application macros

Anonymous
Not applicable

Hi, I created a couple application macros for my office, but I do not know how to easily share them with my coworkers. Is there a way to save them as a file and then have my coworkers import them, or will I need to go on each and every computer in the office and then copy my codes one by one?

 

Is it possible to copy the whole folder containing my modules and then paste that folder on the other machines directly? Or would that cause issues?

 

Thanks,

Antoine

0 Likes
Accepted solutions (1)
2,728 Views
4 Replies
Replies (4)
Message 2 of 5

so-chong
Advocate
Advocate
Accepted solution

Hi,

 

To copy macros(modules) from on pc to another pc, this is my approach;

- go to your 'AppHookup' directory, something like this (depending on which version you are working)
   C:\ProgramData\Autodesk\Revit\Macros\2017\Revit\AppHookup

- copy all the folders in this directory (those are your moddules in your macro manager)

- then you can paste all the folders on the same location on another pc

- open revit, open your macro manager, confirm that the modules are displayed in your macro manager.

- click edit to open the sharp develeop editor, build or rebuild your solution to confirm your module is running without any errors

- if there are no errors, you can run the macro.


Hope this helps.

Message 3 of 5

Anonymous
Not applicable
Hi so-chong,

I tried to follow your steps, but i can't find the this folder 'C:\ProgramData\Autodesk\Revit\Macros\2021\Revit\AppHookup'
instead ther is an file in 'C:\ProgramData\Autodesk\Revit\Macros\2017\Revit' called MacroOpenMe without a filetype, that i can't open.

Do you have any idea why this is so?

kindly regards
Christian
0 Likes
Message 4 of 5

GaryOrrMBI
Collaborator
Collaborator

1) Ensure that "Enable application Macros" is selected under "Macro Security".

2) I have sometimes had to create a "test" application Macro in the target computer to create the required subfolders and enable the required application pointers, copy the specific application, then delete the "test" macro.

3) You may have issues going from one version of Revit to another with a macro, especially backwards since newer classes, methods, and properties may not exist in the older versions.

 

-G

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank You much!
After point 2 it works, now i have the folder.

Peace
0 Likes