This document is archived and information here might be outdated.  Recommended version.


IPRJSpatialReferenceGEN.ExportSpatialReferenceToPRJ Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPRJSpatialReferenceGEN Interface > IPRJSpatialReferenceGEN.ExportSpatialReferenceToPRJ Method
ArcGIS Developer Help

IPRJSpatialReferenceGEN.ExportSpatialReferenceToPRJ Method

Exports the spatial reference to a buffer.

[Visual Basic .NET]
Public Sub ExportSpatialReferenceToPRJ ( _
    ByRef str As String, _
    ByRef cBytesWrote As Integer _
)
[C#]
public void ExportSpatialReferenceToPRJ (
    ref string str,
    ref int cBytesWrote
);
[C++]
HRESULT ExportSpatialReferenceToPRJ(
  System.String* str,
  System.Int32* cBytesWrote
);
[C++]
Parameters
str [out]

str is a parameter of type BSTR* cBytesWrote [out]
cBytesWrote is a parameter of type long*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Converts a spatial reference object into a PRJ file. A PRJ file stores the coordinate system information for a coverage, GRID, or TIN.

A sample representation (reformatted for display) is below.

Projection    UTM   
Zone          10  
Datum         NAD83     
Zunits        NO     
Units         METERS     
Spheroid      GRS1980     
Xshift        0.0000000000     
Yshift        0.0000000000  
Parameters    

If the spatial reference cannot be represented with the workstation PRJ format, E_SPATIALREFERENCE_CANTDEFINESR is returned.

Errors Returned

E_SPATIALREFERENCE_CANTDEFINESR

See Also

IPRJSpatialReferenceGEN Interface