Skip to content

Commit c6879a6

Browse files
author
Fraser Greenroyd
committed
Attempt to load Revit API if needed/existing
1 parent 0d1344d commit c6879a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PostBuild/Program.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using System.Collections.Generic;
2525
using System.IO;
2626
using System.Linq;
27+
using System.Reflection;
2728
using System.Text;
2829
using System.Threading.Tasks;
2930

@@ -48,6 +49,13 @@ static void Main(string[] args)
4849
if (!Directory.Exists(targetFolder))
4950
Directory.CreateDirectory(targetFolder);
5051

52+
try
53+
{
54+
Assembly.LoadFrom(@"C:\ProgramData\BHoM\Assemblies\RevitAPI.dll");
55+
Assembly.LoadFrom(@"C:\ProgramData\BHoM\Assemblies\RevitAPIUI.dll");
56+
}
57+
catch { }
58+
5159
// Create Upgrades file
5260
CopyUpgrades(sourceFolder, targetFolder);
5361
}

0 commit comments

Comments
 (0)