Aug 6, 2013 at 11:07 PM
Edited Aug 6, 2013 at 11:22 PM
To further Paul's email and to answer my own question on the Forum re changing a single shape's outline:
The documentation reports the C# call
Shapefile.set_ShapeCategory (int ShapeIndex, int pVal ) .
It is good to know however, that in vb.net you skip the set_ en get_ prefixes of the functions (or at least in VS2008) and that the call format is different as well. Btw, there are now two more options to change a single shape visualisation attribute: set_ShapeCategory2
and set_ShapeCategory3 with different call lists.
So, to set/change the outline of a poly in VB.Net, you could use the following code:
Dim shpfile As New MapWinGIS.Shapefile
Dim ShapeIndex as integer = 5 'pick a shape in the shapefile
Dim utils As MapWinGIS.Utils = New MapWinGIS.Utils
Dm ct ShapefileCategory = sf.Categories.Add("SomeName")
ct.DrawingOptions.FillColor = utils.ColorByName(MapWinGIS.tkMapColor.Blue)
ct.DrawingOptions.LineColor = utils.ColorByName(MapWinGIS.tkMapColor.Red)
ct.DrawingOptions.LineWidth = 4
shpfile.ShapeCategory3(ShapeIndex) = ct
Please note that the category name ("SomeName" in the code example) is not checked for uniqueness and this could cause problems if used in the ShapeCategory2 call.
Thanks to Paul and Sergei for their help in resolving this issue.