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: 24.0.0.0 (24.0.0.0)
Since: 2019.2
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- coordSystem
- Type: SystemString
The coordinate system to set for 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
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | coordSystem is an empty string or contains only whitespace. -or- The coordinate system is not valid. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsInternalException | Fail to update coordinate system. |
Autodesk.Revit.ExceptionsInvalidOperationException | The site location does not come from the project. |