TransWikia.com

How to open shapefile dataset using ArcGIS Pro SDK .NET?

Geographic Information Systems Asked by Pavel Butusov on June 24, 2021

I write AddIn for ArcGIS Pro using ArcGIS Pro sdk.

I have a shapefile on my disk(for example “D:Datashapefile.shp”).

How can I open this featureclass?

For gdb geodatabase is very simple

using (var gdb = new Geodatabase(path)) 
{
 var dataset = gdb.OpenDataset(); 
}

but folder is not geodatabase and this code didn’t work.

One Answer

using (var shapefileFolder = new Shapefile(new DirectoryInfo(path))
{
    var dataset = shapefileFolder.OpenTable(shpfile);
}

Correct answer by bertt on June 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP