Back

Ini or Outie? Advancing Your Customization of the Revit ini File

I really don’t want to know if you have an “innie” or an “outie,” unless it pertains to Autodesk® Revit®! Do you use an out-of-the-box initialization file with no changes (outie) or do you customize it (ini) to help users in your company have a more pleasant time opening and using Revit? Have you been avoiding customization with Revit 2012 due to the change in how ini files are created? If so, have no fear—this article will help you out.

The Revit ini (short for initialization) file is used by Revit when a user launches the program for the first time. Revit can be told by this ini file that certain plug-ins are installed, certain settings are turned on/off, and preferences can be set in advance. By default, Autodesk provides an ini file for Revit with very basic settings. Many people, however, want to control the settings from a company-wide standpoint, thereby entering the arena of why you would want to customize it.

Before we jump right into customizing it, we need to find a few paths and a couple tools. Please keep in mind the following info is based on running Revit 2012 on a Window’s 7 64-bit OS (that’s really what you should be using anyways…). First, go download the Revit 2012 Deployment Utility & Notepad++

Revit 2012 Deployment Utility http://tinyurl.com/RevitDU1

Notepad++ http://tinyurl.com/NPplusplusDL

Next, be sure you can find the following files/locations on your hard drive:

C:\Program Files\Autodesk\Revit Architecture 2012\Program\UserDataCache
C:\Users\sbennett\AppData\Roaming\Autodesk\Revit\Autodesk Revit Architecture 2012

If you haven’t already created a network deployment image, go start it now. You’ll need that completed prior to looking for the inifile.xml (this assumes you have a good understanding of how to build that image). Now, find the following files/locations in the network deployment image you created on your network:

\x64\RAC2012\inifile.xml
\x64\RAC2012\Program Files\Autodesk\Root\Program\Setup\Cache\inifile.xml

At this point, you can choose from two separate routes. You can use the automated tool from Autodesk to make some simple changes to the ini file, which can combine a previous custom Revit ini file with the xml file. The other route is to edit the inifile.xml file using notepad++. Using a tool to build a custom ini file is no fun, though!

We will cover going the route of notepad++ to edit the xml file directly. You will want to copy the inifile.xml to your desktop from the network. After installing notepad++, right click this copied xml file and choose to edit with notepad++.

The great thing about notepad++ is that it will color code everything automatically, which helps those who are new to xml coding decipher what they are looking at (see Figure 1). It also allows you to collapse/expand sections which helps minimize scrolling on long files. There are two main things you will want to keep in mind when editing the file: Structure and Syntax.

The Structure can be maintained by entering after the same line where new a new code line is added or by using the tab/space bar key to match indents. Another part of the Structure is the Sections, which group data together. The start of a section will look like <Section> and the end will look like </Section>. Data inside the Section is structured using a repeatable flow like this: File->Section->Data. In past versions of Revit, the ini file contained what I call Sections too, inside brackets (e.g., [Directories]). Things that controlled messages upon opening Revit, options and other user interface choices were grouped into appropriate sections.

Here is what sections looked like in past versions of the Revit.ini file (items in bold) and the commands are grouped below:

[Messages]
SuppressNewFeaturesWorkshop=1
SuppressHardwareFullySupportUnknownCardWarning=1

[Graphics]
UseGraphicsHardware=0

Here is an example of some added Sections to the inifile.xml (items in bold) and the commands are grouped below:
<!-- Company Added Section Begin -->
<Section Name="Selection">
      <Data Key="AllowPressAndDrag"><![CDATA[0]]></Data>
</Section>
<Section Name="Windows">
      <Data Key="Maximized"><![CDATA[1]]></Data>
     </Section>
<Section Name="Messages">
    <Data Key="SuppressHardwareFullySupportUnknownCardWarning"><![CDATA[1]]></Data>
   <Data Key="SuppressGraphicsHardwareWarning"><![CDATA[1]]></Data>
   <Data Key="SuppressHardwareFullySupportNewDriverWarning"><![CDATA[1]]></Data>
   <Data Key="SuppressHardwareFullySupportOldDriverWarning"><![CDATA[1]]></Data>
</Section>
<!-- Company Added Section End -->

The syntax deals with the special characters and spacing for each line of code (including, but not limited to < [ / ! - ) Color coding is automatically applied to text depending on the syntax used. Be sure to match syntax so things are color coded correctly. You can add notes to the xml file with something like the following: <!-- NOTE TEXT --> This is a great idea so that others who look at the file can easily identify changes made and what they entailed.

A command that deals with a yes/no option can be set via a 1 or a 0, hence the <![CDATA[1]]> (yes or active) or <![CDATA[0]]> (no or inactive). Library locations can be set inside of a CDATA item too, using a second set of brackets. It would look something like this: <Data Key="ProjectPath"><![CDATA[C:\Revit Local Files]]></Data>  I placed the extra set of brackets in bold to help them stand out.

Another thing I’ve found useful when looking through an xml file in Notepad++ is if you double-click a word, it will highlight any other duplicate instances found. This is great for finding similar lines of data. Using the double-click to find similar items, space bar/enter/tab key to control syntax and copy/paste, you can start modifying the ini file.

Once you’ve finished editing the ini file, it’s probably a good thing to have someone who is familiar with what you are doing to review your work. Then backup the inifile.xml file from the network deployment on the network to somewhere safe and unforgettable. Copy the modified inifile.xml into the two paths on the network shown near the beginning. Next, install Revit from the network deployment image on a test machine and see how your ini file looks (it will be found in your roaming folder shown above. If it looks like it did in past releases of Revit you are in good shape). Launch Revit and see if your changes took hold. If not, you may need to go back and adjust a few lines of code. Otherwise, if everything worked you can now enjoy the benefits of your custom ini file!

References:
http://tinyurl.com/RevitClinic1
http://tinyurl.com/RevitClinic2
http://tinyurl.com/RevitClinic3
http://tinyurl.com/RevitClinic4
Further changes one can make to the ini file:
http://tinyurl.com/RevitClinic5

Steve Bennett is currently the firm-wide CAD manager for HMC Architects. He works with teams in the daily use, support, and application of Revit Architecture and Vasari along with AutoCAD Architecture, 3ds Max Design, and Navisworks. Prior to joining HMC, Steve was the technical manager for the AEC and Design Visualization industries for U.S. CAD and brings more than 16 years of industry experience. During his time with U.S. CAD, he regularly conducted seminars on the use of Autodesk technology in Architecture and Design Visualization and provided implementation services, customization, training, and support to AEC design professionals. Prior to joining the Autodesk reseller channel, he worked as a drafter, designer and CAD manager for an engineered lumber products company where he worked on a variety of commercial and residential projects. Steve is an Autodesk Certified Professional for AutoCAD, Revit Architecture, and 3ds Max Design and is an Administrator for the AUGI forums.

Appears in these Categories

Back