ArcObjects Library Reference (GeoDatabase)  

ISaveAs.SaveAs Method

Creates a new persistent Dataset of a given format.

[Visual Basic .NET]
Public Function SaveAs ( _
    ByVal Name As String, _
    ByVal Workspace As IWorkspace, _
    ByVal Format As String _
) As IDataset
[C#]
public IDataset SaveAs (
    string Name,
    IWorkspace Workspace,
    string Format
);
[C++]
HRESULT SaveAs(
  BSTR Name,
  IWorkspace* Workspace,
  BSTR Format,
  IDataset** Dataset
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR Workspace [in]

  Workspace is a parameter of type IWorkspace

Format [in]   Format is a parameter of type BSTR Dataset [out, retval]

  Dataset is a parameter of type IDataset

Product Availability

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

Remarks

The format strings used for the supported formats are below, and they are case sensitive:

Format Name String Used
Imagine "IMAGINE Image"
TIFF "TIFF"
GRID "GRID"
JPEG "JPG"
JP2000 "JP2"
BMP "BMP"
PNG "PNG"
GIF "GIF"
PCI Raster "PIX"
X11 Pixmap "XPM"
PCRaster "MAP"
Memory Raster "MEM"
HDF4 "HDF4"
BIL "BIL"
BIP "BIP"
BSQ "BSQ"
Idrisi Raster Format "RST"
ENVI Raster Format "ENVI"
Geodatabase Raster "GDB"
 

 

 

Note, SaveAs will return a RasterDataset, to prevent from ISaveAs holding the output, .NET ReleaseCOMObject needs to be called to release the referene to the output raster dataset:

    System.Runtime.InteropServices.Marshal.ReleaseComObject(outRasterDS);

 

See Also

ISaveAs Interface