ApplySymbologyClassedColors

ApplySymbologyClassedSymbols method sets line, fill, and/or symbol properties to the features of the symbology's classed colors in the VectorBaseLayer object. This method displays features that do not have an attribute value in the layer.

Syntax

object.ApplySymbologyClassedSymbols(AttributeField, ShowMissingValues, ClassMethod, Count, ShowAllOthers, UseColormap, ReverseColorOrder)

Parameter

Type

Default

Description

AttributeField String   required
ShowMissingValues Boolean True optional
ClassMethod SrfSymBinMethod

 

optional
Count Integer

 

optional
ShowAllOthers Boolean

 

optional
UseColormap Boolean True optional
ReverseColorOrder Boolean

 

optional

Example

Sub Main

Dim Surfer As Object

Set Surfer = GetObject(,"Surfer.Application")

Surfer.Visible = True

 

' Create symbology using classed colors

Set doc = Surfer.Documents.Add

Set map = doc.Shapes.AddDataBaseMap(ImportFileName:=Surfer.Path+"\samples\NV_LasVegasValley_2010_000379.laz", ImportOptions:="AcceptNthPoint=1000")

Set layer = map.Overlays.Item(1)

 

layer.ApplySymbologyClassedColors(AttributeField:="Column D", ClassMethod:=srfSymNaturalBreaks, Count:=20, UseColormap:=False)

layer.ShowLegend = True

 

' Change some settings for the classes

Set classes = layer.SymbologyClassedColorsBins

For Each c In classes

c.UpperValue = c.UpperValue -2 ' make the upper values slightly smaller

c.Name = "class with upper value of " + Str(c.UpperValue) ' change the name to include the upper value

 

' Assign colors and opacities

c.ColorRGBA.red = Rnd() * 255

c.ColorRGBA.blue = Rnd() * 255

c.ColorRGBA.green = Rnd() * 255

c.ColorRGBA.opacity = Rnd() * 100

 

End Sub

Used by: VectorBaseLayer object

See Also

Legend

PostLayer Object

Symbology

Vector Base Layer