I'm looking for an example to just create a simple shapefile offline (Feature layer from shapefile). Any examples out there? Tips? Seems like a basic thing to do, but I can't seem to find how in the help.
Thanks,
Joe
Solved! Go to Solution.
Hi,
In ArcGIS Runtime SDK for .NET 10.2.7 the ShapefileTable class cannot be constructed programmatically (and features are read-only). In a future release we are considering enabling the direct editing of existing Shapefiles via this API. To create Shapefiles from scratch you can use LocalServer component which is available with the ArcGIS Runtime SDK. Functionality such as creating Shapefiles is implemented through LocalGeoprocessingServices in the LocalServer. To start a LocalGeoprocessingService you need to create a geoprocessing package (GPK) using ArcGIS Desktop. That GPK can be created either from a Python script or a Model. For more information see Work with local services—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
A couple of suggestions:
To create a new Shapefile you can use the Create Feature Class tool in the DataManagemment toolbox.
To update features in an existing Shapefile you could use the ArcPy DataAccess UpdateCursor.
Cheers
Mike
Hi,
Do you mean you simply want to add a Shapefile to the Map? Or you would like to programmatically construct a Shapefile by defining geometry type, fields, etc?
Cheers
Mike
I would like to programmatically construct a shapefile.
P.S., is there a way to have the forums notify you when there is a response to your answer?
Thanks,
Joe
As far as I know, runtime does not offer this functionality.
I achieved this by writing an SOE and deploying to my ArcGIS Server that would do this for me.
This seems like a basic thing that should be included in the Runtime. Thanks Saliegh.
Hi,
In ArcGIS Runtime SDK for .NET 10.2.7 the ShapefileTable class cannot be constructed programmatically (and features are read-only). In a future release we are considering enabling the direct editing of existing Shapefiles via this API. To create Shapefiles from scratch you can use LocalServer component which is available with the ArcGIS Runtime SDK. Functionality such as creating Shapefiles is implemented through LocalGeoprocessingServices in the LocalServer. To start a LocalGeoprocessingService you need to create a geoprocessing package (GPK) using ArcGIS Desktop. That GPK can be created either from a Python script or a Model. For more information see Work with local services—ArcGIS Runtime SDK for .NET | ArcGIS for Developers
A couple of suggestions:
To create a new Shapefile you can use the Create Feature Class tool in the DataManagemment toolbox.
To update features in an existing Shapefile you could use the ArcPy DataAccess UpdateCursor.
Cheers
Mike