I cannot use shapefile.EditAddField() in VB.net

Mar 14, 2013 at 4:01 AM
Edited Mar 14, 2013 at 4:05 AM
Hi all
From this link (below).
http://www.mapwindow.org/documentation/mapwingis4.8/_create_polygon_shapefile_8cs-example.html#a5

In this line.
int fldX = sf.EditAddField("x", FieldType.DOUBLE_FIELD, 9, 12);

I use it in vb.net and vb.net alert message ("'EditAddField' is not a member of MapWinGis.shapefile ")
My Example code
Dim sf As New MapWinGIS.Shapefile
sf.CreateNewWithShapeID("", MapWinGIS.ShpfileType.SHP_POINT)
'add field
sf.EditAddField("x",................... )

How to solve it. >_<
Ps. I use Mapwingis4.8 + vb.net 2010
Coordinator
Mar 15, 2013 at 1:31 PM
You might need a newer version of the ocx.
You can download it from here: http://svn.mapwindow.org/svnroot/MapWindow4Dev/Bin/
You'll need the ocx and the two interop dlls.
regMapWinGIS.cmd can be used to register the ocx
Depending on how old your current version is you might need some of the other dlls too.

To be on the save side you can install the latest version of MapWindow, this includes the ocx:
http://tinyurl.com/mwMonthly

Paul
Mar 18, 2013 at 1:55 AM
Hi Paul
Thank you very much.