Share
 
 

Installing .NET Connection files for Revit

Several steps need to be taken when installing a .NET Connection add-in for Revit.

Install .NET Connection dll

The following files should be installed under the Steel Connections add-in program folder, which is under the AddIns folder in the Revit installation folder.

The default path is something like "C:\Program Files\Autodesk\Revit 2025\AddIns\SteelConnections". This path should be composed from the Revit install location (available from Registry Key HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\Revit\2025\REVIT-05:0409\InstallationLocation) and the relative path to the Revit Addins which is AddIns\SteelConnections. The preferred way to find the Revit install location is using the RevitAddInUtility.dll which is included with the Revit program files and can be redistributed with your installer so that you can use it to find the Revit install location.

The sample code below is from a Windows console application. It will find the Revit 2025 install location and add the relative path to the SteelConnections folder under AddIns, then write the path to a text file in the same location as the executing assembly.

Code Region: Find the Revit install location for Steel Connections

  using Autodesk.RevitAddIns;
using System.Collections.Generic;

namespace GetInstallFolder
{
    public class Program
    {
        static void Main(string[] args)
        {
            IList<RevitProduct> revitProducts = RevitProductUtility.GetAllInstalledRevitProducts();
            foreach (RevitProduct revitProduct in revitProducts)
            {
                if (revitProduct.Product == ProductType.Revit &&
                    revitProduct.Version == RevitVersion.Revit2017)
                {
                    string newDir = revitProduct.InstallLocation + "AddIns\\SteelConnections";

                    string ExecutingAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
                    string directory = System.IO.Path.GetDirectoryName(ExecutingAssemblyPath);

                    string file = directory + "\\InstallLoc.txt";
                    System.IO.File.WriteAllText(file, newDir);
                }
            }
        }
    }
}

Edit the database and xml files

As discussed in previous sections, the AstorRules database and SteelConnectionsData.xml file needs to be updated for each country supported by the Steel Connections add-in for Revit.

In the SteelConnections install location found above, there is an ASSettings_Advance.xml file. This file contains the path to the location of the language folders which contain the SteelConnectionsData.xml and AstorRules database files which need to be edited. The DataPath contains the relevant path. The default is C:\ProgramData\Autodesk\Revit Steel Connections 2025.

Was this information helpful?