Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: Help needed - in-memory creation of shapefile

$
0
0
First remark.
EditAddField already returns the index of the newly created field (http://www.mapwindow.org/documentation/mapwingis4.9/group__shapefile__table.html#ga158f17d91bd1ffc32332fd64df224be5)

And most methods return false when something went wrong. With sf.ErrorMsg[sf.LastErrorCode] (C# code) you can check what the problem is.

And if you are going to call sf.EditAddField you need to start with sf.StartEditingShapes(true, null); (C# code) and end with sf.StopEditingShapes and check its return value.

When I look at this sample (http://www.mapwindow.org/documentation/mapwingis4.9/_minimal_distance_8cs-example.html) it seems you don't need to call sf.StopEditingShapes because it is an in-memory shapefile.

I hope it helps.

Paul

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>