Bug in MW4.8 with ShapeLayerPointType and Categories -VBA

May 23, 2012 at 7:07 AM

Good morning

I ve been trying the 4.8.6 version today to see how i could migrate my 4.7 application. It went good until i found out that i was not able to categorise my data. and to display my point correctly.

For exemple, for ShapeLayerPointType, this following code works:

 

        sfPointLine.DefaultDrawingOptions.SetDefaultPointSymbol (dpsCircle)
        sfPointLine.DefaultDrawingOptions.PointSize = PointSize
        sfPointLine.DefaultDrawingOptions.FillColor = colorShape      
       
        PointLineLayer = myform.mapMain.AddLayer(sfPointLine, True)

 

While this one doesn't (Default symbol is used):     

 PointLineLayer = myform.mapMain.AddLayer(sfPointLine, True)
    
        myform.mapMain.ShapeLayerPointColor(PointLineLayer) = colorShape
        myform.mapMain.ShapeLayerPointSize(PointLineLayer) = PointSize
       myform.mapMain.ShapeLayerPointType(PointLineLayer) = MapWinGIS.tkDefaultPointSymbol.dpsCircle

 

Moreover, this code for building categories doesn't work in VBA:

 

        Dim cat As New ShapefileCategory
        Set cat = sfPointLine.Categories.Add("Fishing")
        cat.Expression = "[LONGITUDE]>149.5"
        cat.DrawingOptions.FillColor = RGB(255, 170, 42)
       
        sfPointLine.Categories.ApplyExpressions

 

While in 4.7, its equivalent (colorbreak and colorscheme) works nicely.

Thanks to let me know if i am wrong or if it is a real bug of MW4.8.

Sylvain