Jan 30, 2015 at 6:19 PM
Hello again,

I use the follwing (vba) code to display a shapelayer with labels. Nearly everything works so far, only the Line where I want to set the symbol size crashes the application. (This code is imported from MapWinGis.ocx 4.8.8):
' Zweiten Layer
    Set objText = New MapWinGIS.Shapefile
    If objText.Open(Application.CurrentProject.Path & "\texte.shp") = True Then
        objText.Labels.FontName = "Arial"
        objText.Labels.FontSize = 6
        objText.Labels.FrameTransparency = 1
        ' Shape-Objekt durchlaufen
        For i = 0 To objText.NumShapes - 1
            ' Label-Text ermitteln
            strLabel = CStr(objText.CellValue(6, i))
            ' Label-Koordinaten ermitteln
            dblX = objText.Shape(i).Point(0).x
            dblY = objText.Shape(i).Point(0).y
            objText.Labels.AddLabel strLabel, dblX, dblY
        Next i
        lnglayerhandle = Me.mapMain.AddLayer(objText, True)
        ' the next line crashes the app
        Me.mapMain.ShapeLayerPointSize(lnglayerhandle) = 1
    End If
Can anybody help?
Jan 31, 2015 at 9:59 AM
Hi, this time it's a bug. Rather rare one - it seems it crashes only with point size <= 1 (single pixel) for larger sizes it works ok. I've already committed a fix. An updated installer will be available soon since we already have couple of other fixes waiting. Meanwhile as a workaround please try to set point size to 2. Also the recommended way to set shapefile options is Shapefile.DefaultDrawingOptions.PointSize = 2. Check third section here.

Thank you for reporting this,
Marked as answer by pmeems on 2/6/2015 at 2:45 AM
Jan 31, 2015 at 10:34 AM
Hi Sergei,

thanks very much!