With ArcGIS Pro SDK 1.4 I could do this:
new Geodatabase(geodatabasePath)
where geodatabasePath can be path of FGDB or SDE file.
I know that now there are constructor overloads for FGDB and SDE. But the problem is that I don't know which database type will be presented by geodatabasePath.
How can I create an instance of the Geodatabase by path that can be either path of FGDB or SDE file? Or maybe there is some method that can say what geodatabase type presented by a path?
Solved! Go to Solution.
Hi Max
This is a peace of code from snippets (look at notes):
https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Raster
// Create a FileGeodatabaseConnectionPath using the path to the gdb. // Note: This can be a path to a .sde file.FileGeodatabaseConnectionPath geodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Temp\rasters.gdb"));// Create a new Geodatabase object using the FileGeodatabaseConnectionPath.Geodatabase geodatabase = new Geodatabase(geodatabaseConnectionPath);
Hi Max
This is a peace of code from snippets (look at notes):
https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Raster
// Create a FileGeodatabaseConnectionPath using the path to the gdb. // Note: This can be a path to a .sde file.FileGeodatabaseConnectionPath geodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Temp\rasters.gdb"));// Create a new Geodatabase object using the FileGeodatabaseConnectionPath.Geodatabase geodatabase = new Geodatabase(geodatabaseConnectionPath);