This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISaveAs Interface > ISaveAs.SaveAs Method (ArcObjects .NET 10.4 SDK) |
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
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);