Hi
I have a point and line shape file that are linked to the same key value eg each unique value could have a couple of points and some lines. I want the same unique values to be the same colour, but each separate value to be a different colour. I used the following and all the colours are different as required, but the points that belong with the lines with the same unique value the colours are not the same. I am thinking that as they are 2 different shape files this cannot be controlled. I am right in assuming I will to do my own expressions and apply these in order to make the colours the same?
fieldIndex = 0
With shpPnt(LyrNo).DefaultDrawingOptions
.Visible = True
.PointSize = 8
.PointShape = tkPointShapeType.ptShapeCircle
End With
Dim schemePnt As New MapWinGis.ColorScheme
schemePnt.SetColors2 tkMapColor.Blue, tkMapColor.Yellow
shpPnt(LyrNo).Categories.Generate fieldIndex, tkClassificationType.ctUniqueValues, 0
shpPnt(LyrNo).Categories.ApplyColorScheme tkColorSchemeType.ctSchemeRandom, schemePnt
hndPnt(LyrNo) = Forms!DisplayGISmap.Map1.AddLayer(shpPnt(LyrNo), True)
With shpLine(LyrNo).DefaultDrawingOptions
.LineWidth = 4
.Visible = True
End With
Dim schemeLine As New MapWinGis.ColorScheme
schemeLine.SetColors2 tkMapColor.Blue, tkMapColor.Yellow
shpLine(LyrNo).Categories.Generate fieldIndex, tkClassificationType.ctUniqueValues, 0
shpLine(LyrNo).Categories.ApplyColorScheme tkColorSchemeType.ctSchemeRandom, schemeLine
hndLine(LyrNo) = Forms!DisplayGISmap.Map1.AddLayer(shpLine(LyrNo), True)
Forms!DisplayGISmap.Map1.Redraw
Regards
Colleen