Application: ModifyIniFile
Revit Platform: All
Revit Version: 2009.0
First Released For: 2008.0
Last Modified: 02/26/2008
Modified By: AL Autodesk
Programming Language: C#
Skill Level: Beginning
Category: Mechanism (ini)
Type: N/A

Subject: Modify Revit.ini.
Summary: 
Provides sample that shows how to add an external command that represents the menu item “Tools-> External Tools-> (Command)” to Revit.ini using program.

Classes: 

Project Files: 
Program.cs
This file contains main() function that is the entry of a console application which adds some external command information to Revit.ini file.

IniFile.cs
This file contains a class named IniFile that provides some functions to read or write ini file.

Description: 
-	This sample adds some configuration information as following of a new external command to Revit.ini file (X stands for the new command number):
ECNameX=My Command
ECClassNameX=Test.Command
ECDescriptionX=My Command Description
-	And uses the existing Win32 API calls "WritePrivateProfileString" and "GetPrivateProfileInt" to read and write from standard INI files using the DllImportAttribute within C#.

Instructions: 
1.	Compile and run.