PLTPenColor Example for Visual Basic
Private Sub PLT_Click()
Dim iPen As Integer
Dim iWidth As Integer
Dim crColor As Long
Dim RasterIO As New LEADRasterIO
For iPen = 0 To 7
iWidth = Round(iPen / 2) + 1
Select Case iWidth
Case 1
crColor = RGB(255, 0, 0)
Case 2
crColor = RGB(0, 255, 0)
Case 3
crColor = RGB(0, 0, 255)
Case 4
crColor = RGB(255, 255, 0)
Case Else
crColor = RGB(255, 0, 255)
End Select
'Change Pen width
RasterIO.PLTPenWidth(iPen) = iWidth
'Change Pen color
RasterIO.PLTPenColor(iPen) = crColor
Next iPen
' Now load the PLT file
RasterIO.Load LEADRasterView1.Raster, "c:\image1.plt", 0, 0, 1
End Sub