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


ISaveAs.SaveAs Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISaveAs Interface > ISaveAs.SaveAs Method
ArcGIS Developer Help

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
);
[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

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

.NET Samples

Mosaic raster datasets to a file raster format Create a custom NoData pixel filter