RVTDocs.com
Namespace: Autodesk.Revit.DB

City

Class
Description:
An object that contains geographical location information for a known city.
Remarks:
This object contains longitude, latitude, time zone information for a city already known by Revit. Currently Revit does not the ability to add cities to the existing list. The list of known cities can be retrieved using the Cities property on the application object.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.City
Syntax
public class City : APIObject
Examples
double angleRatio = Math.PI / 180;   // ratio of Angle

// Get the Latitude information
double latiude = city.Latitude / angleRatio;
String latiudeInfo = "Latitude:      " + latiude.ToString();

// Get the Longitude information
double longitude = city.Longitude / angleRatio;
String longitudeInfo = "Longitude:   " + longitude.ToString();

// Get the TimeZone information
String timeZoneInfo = "TimeZone:   " + city.TimeZone.ToString();

// Set the information text box.
string cityInfo = latiudeInfo + "\n" + longitudeInfo
                            + "\n" + timeZoneInfo;
City Class Members:
Name Description Inherited From
IsReadOnly Identifies if the object is read-only or modifiable. (Inherited from APIObject ) APIObject
Latitude Latitude of the city
Longitude Longitude of the city
Name The name of the city
TimeZone Time-zone in which the city resides
WeatherStation An identifier for the nearest weather station
Name Description Inherited From
Dispose Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject ) APIObject
Equals Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
GetHashCode Serves as the default hash function. (Inherited from Object ) Object
GetType Gets the Type of the current instance. (Inherited from Object ) Object
ToString Returns a string that represents the current object. (Inherited from Object ) Object