Reducing Revit Debug Verbosity

Many people have complained about the amount of noise caused by the ribbon in the Visual Studio debug output window.

Kean Walmsley just pointed out that you can easily make AutoCAD less noisy when debugging by adding a couple of lines to the acad.exe.config file, which lives in the same folder as the acad.exe you are debugging, such as C:\Program Files\Autodesk\AutoCAD 2011, to ask the WPF binding trace provider to lower the volume.

Since Revit uses the same internal ribbon principles as AutoCAD, I thought this might help for Revit as well.

Adding the lines suggested by Kean to my Revit MEP 2011 config file Revit.exe.config in the Program subfolder of the Revit MEP installation directory, by default C:\Program Files\Autodesk\Revit MEP 2011\Program, does indeed achieve a similar effect.

Here is my updated Revit.exe.config with the added lines in bold (to see the truncated lines in full, copy to a text editor):

<?xml version="1.0" encoding="utf-8"?>
    <section name="uri" type="System.Configuration.UriSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <servicePointManager expect100Continue="false"/>
    <generatePublisherEvidence enabled="false"/>
    <idn enabled="All"/>
    <iriParsing enabled="true"/>
        <binding name="BasicHttpBinding_IThorService" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="1572864" maxBufferPoolSize="524288" maxReceivedMessageSize="1572864"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="1572864"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" />
      <endpoint address=""
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IThorService"
                contract="ThorReference.IThorService" name="BasicHttpBinding_IThorService" />       
    <add key="Provider" value=""/>
    <add key="consumerKey" value="sampleconsumer"/>
    <add key="consumerSecret" value="samplesecret"/>

  <!-- added by jeremy, cf. -->

      <source name="System.Windows.Data" switchName="SourceSwitch">
          <remove name="Default" />


It obviously works fine for Revit as well. Here are two text files containing the debug output before and after reducing verbosity, with the following line, word and character counts produced by the wc, the Unix word count command:

  174  4019 50362 debug_verbosity_default.txt
   56   630 11583 debug_verbosity_quieter.txt

The line and byte count is reduced to less than a third, and the word count to less than a sixth!

I immediately added these lines to my RAC and RST config files as well :-)

Many thanks to Kean for this useful discovery!

Room Renumbering Feedback

Adam Nagy received some very positive feedback on his recently mentioned Room Renumbering tool, the first ever Revit plugin of the month:

Based on the feedback and wishes received so far, Adam is already thinking about some possible enhancements...