Duplicate a Macro in Revit 2025

Duplicate a Macro in Revit 2025

sragan
Collaborator Collaborator
144 Views
1 Reply
Message 1 of 2

Duplicate a Macro in Revit 2025

sragan
Collaborator
Collaborator

I'm still working on my last question (upgrading a macro to Revit 2025 with VS Code), but in the meantime, I have another question:

 

How can I duplicate a macro in Revit 2025?  (ie.  create the exact same macro with a different name and folder name.)

 

For example, I have one macro created that has Windows Forms References included.  I would like to use this Macro as a template to create other macros.  But atlas, there doesn't seem to be any "duplicate" or "copy" function in the Revit 2025 macro editor.

 

Maybe it's in VS Code?

 

I realize I can go in windows explorer, and copy and paste the macro folder and rename it, but that also requires renaming a few other files, and even editing a few files to correct paths and file names.  I was hoping there is an easier way.

 

0 Likes
145 Views
1 Reply
Reply (1)
Message 2 of 2

sragan
Collaborator
Collaborator

I never found a way to duplicate the macro, so maybe this should be a topic for the Revit Ideas section.

 

Someday I may try to write a macro that does this.  I believe it just a matter of copying files and folders and renaming them.

 

Anyhow, I realized a template might not be necessary.  Windows forms can be added in VS code simply by adding a UseWindowsForms property in the project csproj file.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <UseWindowsForms>true</UseWindowsForms>
    <UseWPF>true</UseWPF>
    <Nullable>enable</Nullable>
  </PropertyGroup>

 

0 Likes