Thank You for the code example Paul. I'm using Version 4.8.8 SR on my PC, and trying to get to grips with the categories side of things, and this is the best VB example I could find in order to transpose the code for use in a Microsoft Access form's VBA code
The problem I get is, when getting to the line below, I get a runtime error 438, Object doesn't support this property or method. Am I missing an obvious transposition between VB.Net & VBA, or is there a compatibility issue?
PG
The problem I get is, when getting to the line below, I get a runtime error 438, Object doesn't support this property or method. Am I missing an obvious transposition between VB.Net & VBA, or is there a compatibility issue?
ctOrange = SfWaypoints.Categories.Add("Orange")
The complete code as I've edited it on my system is as follows : Dim utls As New Utils
Dim i as integer
Dim ctOrange As New ShapefileCategory
ctOrange = SfWaypoints.Categories.Add("Orange")
ctOrange.DrawingOptions.FillColor = utls.ColorByName(tkMapColor.Orange)
Dim ctBlue As New ShapefileCategory
ctBlue = SfWaypoints.Categories.Add("Blue")
ctBlue.DrawingOptions.FillColor = utls.ColorByName(tkMapColor.Blue)
For i= 0 To SfWaypoints.NumShapes - 1
If i Mod 2 = 0 Then
SfWaypoints.ShapeCategory2(i) = "Orange"
Else
SfWaypoints.ShapeCategory3(i) = ctBlue
End If
Next i
AxMap.AddLayer SfWaypoints, True
Thanks in advance,PG