Application: RvtSamples
Revit Platform: All
Revit Version: 2009.0
First Released For: 2009.0
Last Modified: 02/26/2008
Modified By: LL Autodesk 
Programming Language: C#
Skill Level: Beginning
Category: Mechanism (ui)
Type: ExternalApplication

Subject: Add menu items of samples to Revit.
Summary:
This sample integrates all other samples excluding ExternalApplications into a Revit menu named “RvtSamples”.

Classes: 
Autodesk.Revit.ControlledApplication
Autodesk.Revit.MenuItem

Project Files: 
Application.cs
It contains the class Application which implements interface IExternalApplication.

Description: 
This sample provides following functionalities.
-	Extract samples information from a provided text file named “RvtSamples.txt” and parse them into menu items. The file can be customized and it must follow the following fixed format.
Every menu item consists of four lines. 
1.	The first line represents the popup menu hierarchy. Each item in the hierarchy is separated by “/” or “\”. If the line starts with “external tools” (case-sensitive free), this menu item will be added under the menu [Tools] – [External Tools], otherwise a new top menu will be added to Revit following the hierarchy.
e.g. “/external tools/RvtSamples/By Flavour/All/About Revit” will add menu item [RvtSamples] – [By Flavour] – [All] – [About Revit] under Revit’s [Tools] – [External Tools] menu.
However, “/RvtSamples/By Flavour/All/About Revit”” will Add a new top menu [RvtSamples] to Revit and add [By Flavour] – [All] – [About Revit] under it.
2.	The second line represents the description of the menu item.
3.	The third line represents the path of the assembly location of the menu item. 
[NOTE] In the provided text file every item is provided a default path within drive Z. To run the sample successfully, the default path must be modified to the samples’ real paths on your local drive. Assuming your samples local path is C:\Revit\SDK2009, you can either replace all “Z:” in the text file with “C:\Revit” or create a virtual drive Z (via running the dos command “SUBST Z: C:\Revit\SDK2009”).
4.	The last line represents the class name of the menu item.
-	Add all menu items to Revit menu.

Instructions: 
To use this sample, the external application item should be added into Revit.ini first. Once that is done, menu items of samples provided in the text file will be added to Revit automatically every time Revit starts up.