Revit TotD – 7.7.09: Budget Debugging of Revit API coding.


Yes, I have begun my venture into the world of Revit API programming, so you’ll probably start to see a few TotDs that deal with working with the Revit API.  Today’s is one for those of you that are cheap (or unemployed  like myself) and want to use the free Visual Studio Express edition as your code authoring environment but still want to do live debugging.

The issue here is that Miscrosoft lovingly excluded the StartAction option in the debugging properties for your project.  Well, fortunately, they also made it possible to include a StartAction for those of us that know a little something about Google searches and XML 🙂

Including Revit as a Debug Application for debugging in Visual Studio Express:

  1. Notice that there is no StartAction option in the debugging tab in Visual Studio Express.
    TotD-070709-2
  2. Close Visual Studio Express
  3. Open the .csproj.user (or vbproj.user) file in Notepad.
  4. Add the lines (shown below) needed so that your final file looks like this:
    TotD-070709-1

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files\Autodesk Revit Architecture 2010\Program\Revit.exe</StartProgram>
    </PropertyGroup>
    </Project>
  5. Save the user settings file, reopen your project and debug.  Revit should now open for debugging!

I know, I kinda blind sided you guys with this one.  But it is pertinent to Revit, maybe just not to you! Thanks again for stopping by, have a great day and I will see you next time for another Revit TotD!

-Carl

revit_arch_09_cert_pro_rgb


3 responses to “Revit TotD – 7.7.09: Budget Debugging of Revit API coding.”

  1. I really appreciate your post! I thought I was going to have to shell out some bucks for Standard. Thanks!