SetGeoCoordinateSystem Method


Site Location Set Geo Coordinate System Method

Set the geographic coordinate system for this site. Similar to acquire coordinate system from a link in the UI.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void SetGeoCoordinateSystem(
	string coordSystem
)

Parameters

coordSystem String
The coordinate system to set for the project.
Exceptions
Exception Condition
ArgumentException coordSystem is an empty string or contains only whitespace. -or- The coordinate system is not valid.
ArgumentNullException A non-optional argument was null
InternalException Fail to update coordinate system.
InvalidOperationException The site location does not come from the project.
Remarks
The ID, WKT or Autodesk coordinate system xml representation of the coordinate reference system definition. The xml representation is the same format get via RealDWG's API - AcDbGeoData::coordinateSystem. Optionally, the string can be prefixed by the ID's namespace and a colon (:) where the following are supported: ADSK, EPSG. If no namespace has been specified, the ID is assumed to be a default Autodesk coordinate system identifier. If no definition exists with such a code and if it consists of numbers only, the ID string is considered an EPSG code.

Valid examples are:

  • LL84 > Autodesk identifier (default)
  • ADSK:LL84 > Autodesk identifier
  • EPSG:4326 > EPSG identifier
  • 4326 > EPSG identifier
  • GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID[...]]] > WKT

See Also