RVTDocs.com
Namespace: Autodesk.Revit.DB

SiteLocation

Class
Description:
Contains the geographical location information for the project's site.
Remarks:
Each project may have one site which dictates where in the world the project is based. On this site there may be several locations of the same project. These are represented by ProjectLocation objects. The site location object can be found by using the SiteLocation property on the Document object. The properties of this object can be changed such that it represents any location on the planet or to a known city. Cities already programmed into Revit can be found from the Cities property on the Application object.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.Element
    Autodesk.Revit.DB.ElementType
      Autodesk.Revit.DB.SiteLocation
Syntax
public class SiteLocation : ElementType
Examples
// Get the SiteLocation instance.
Autodesk.Revit.DB.SiteLocation site = document.SiteLocation;

// Angles are in radians when coming from Revit API, so we 
// convert to degrees for display
const double angleRatio = Math.PI / 180;   // angle conversion factor

// Format the prompt information. 
String prompt = "Current project's Site location information:";
prompt += "\n\t" + "Latitude: " + site.Latitude / angleRatio + " degrees";
prompt += "\n\t" + "Longitude: " + site.Longitude / angleRatio + " degrees";
// Give the user some information.
TaskDialog.Show("Revit",prompt);

// Change the SiteLocation property data.
site.Latitude = 0.5;    // latitude information
site.Longitude = 0.5;   // longitude information
site.TimeZone = -5;     // TimeZone information