Revit SDK Samples Assembly Reference Updater

By Madhukar Moogala

While I was learning Revit API through SDK samples, I see there is a huge Samples folder with about 180 project files.

I thought it will be good idea to quickly update the references of each project to correct Revit install folder.

There is an executable which does this and is included in SDK samples folder, for some reason it is not working for me.

I created a simple python script, which creates an .User object file having Projects references directed to Revit path.

#This simple app creates .user file corresponding to every .csproj | .vbproj
##With following text
#<?xml version="1.0" encoding="utf-8"?>
#<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
#  <PropertyGroup>
#    <ReferencePath>D:Program FilesAutodeskRevit 2018</ReferencePath>
#  </PropertyGroup>
#</Project>
#Created by moogalm(@galakar), ADN, Autodesk.

import os,shutil
import xml.etree.ElementTree as ET
revitSampleDir = input("Revit SDK Samples Folder, for...

Read more