Application: ProjectInfo
Revit Platform: All
Revit Version: 2011.0
First Released For: 2008.0
Programming Language: C#
Skill Level: Beginning
Category: Basics
Type: ExternalCommand

Subject: Display project information.
Summary: 
Demonstrates how to manipulate project information.

Classes: 
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ProjectInfo
Autodesk.Revit.DB.Analysis.EnergyDataSettings
Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.Analysis.gbXMLBuildingType
Autodesk.Revit.DB.Mechanical.MEPBuildingConstruction
Autodesk.Revit.DB.Analysis.gbXMLServiceType
Autodesk.Revit.DB.ProjectLocation
Autodesk.Revit.DB.ProjectPosition
Autodesk.Revit.DB.Construction

Project Files: 
Command.cs
This file contains the class Command which inherits from IExternalCommand.

Wrappers folder
This file contains interface IWrapper and its subclasses. Those classes are the wrappers of class ProjectInfo, EnergyDataSettings, Construction etc.

ProjectInfoForm.cs
This file contains a Form class ProjectInfoForm which consists of ok, cancel buttons and a PropertyGrid which will show the project information.

Converters folder
This file contains TypeConverters for PropertyGrid usage.

WrapperCustomDescriptor.cs
This file contains a custom descriptor which is used with RevitVersionAttribute to control the visibility of properties in different Revit platform.

Description: 
This sample is to show the same function as clicking Revit menu “Settings->Project Information…” that different platform of Revit will show different information.
-	To get the project information of a document, use Document.ProjectInformation property.
-	To get the “Energy Data” use EnergyDataSettings.GetFromDocument(Document)
-	To get SiteLocation, using Document.SiteLocation
-	To get all cities, using Application.Cities
-	To get SiteLocation, using Document.SiteLocation
-	To get ProjectLocation, using Document.ActiveProjectLocation
-	To get all ProjectLocations, using Document.ProjectLocations
-	To get all BuildingConstruction, using EnergyDataSettings.GetBuildingConstructionSetElementId
-	To get Construction, using BuildingConstruction.GetBuildingConstruction(ConstructionType).
-	To get all Constructions, using MEPBuildingConstruction.GetConstructions(ConstructionType).
-	Using TypeConverterAttribute and DisplayNameAttribute to control the display of properties, using BrowsableAttribute and RevitVersionAttribute to control the visibility.

Instructions: 
1.	Run the command, there shows a form.
2.	Modify some information in the PropertyGrid, then click “OK” button to save the changes.
3.	Run the sample in different Revit prouduct (Architecture, Structure, MEP), you will see different information in the property grid.