SymbologyClassedSymbolsBins Collection

The SymbologyClassedSymbolsBins collection contains the individual classed symbol bins in the collection.

The following table provides the properties of the SymbologyClassedSymbolsBins collection:

Property

Description

Application

Returns the application object.

Count

Returns the number of bins in the collection.

Item

Returns the specified SymbologyClassedSymbolsBin object.

Parent

Returns the parent object.

Example 1

This example shows the addition of classed symbols from different classes.

Sub Main

 

Dim SurferApp As Object

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

SurferApp.Visible = True

 

Dim Doc As Object

Set Doc = SurferApp.Documents.Add

 

Set Map1 = Doc.Shapes.AddVectorBaseMap(SurferApp.Path+"\samples\FL2018.shp")

Set CSymbolsLayer = Map1.Overlays(1)

CSymbolsLayer.Name = "Classed Symbols - Not Same Class Symbols"

 

CSymbolsLayer.ApplySymbologyClassedSymbols(AttributeField:="MF_55-59yr", _

ShowMissingValues:=False, _

ClassMethod:=srfSymEqNum, _

Count:=5, _

ShowAllOthers:=True, _

MinimumSize:=0.15, _

MaximumSize:=0.55, _

ScalingMethod:=srfSymScalingSquareRoot, _

SameClassSymbols:=False, _

SymbolIndex:=12, _

LineColorMethod:=srfSymSColorFixed, _

LineColor:=srfColorPurple)

 

Set Classes1 = CSymbolsLayer.SymbologyClassedSymbolsBins

Classes1.Item(1).Symbol.Index = 6

Classes1.Item(1).Symbol.FillColorRGBA.Color = srfColorPurple

Classes1.Item(2).UpperValue = 7000

Classes1.Item(2).Symbol.FillColorRGBA.Color = srfColorBlue

Classes1.Item(3).Symbol.FillColorRGBA.Color = srfColorYellow

Classes1.Item(3).Symbol.LineColorRGBA.Color = srfColorRed

Classes1.Item(3).Symbol.Index = 10

Classes1.Item(5).Symbol.Index = 30

 

Map1.Top = 10.5

Map1.Left = -1

Map1.Axes(1).Title = "Classed Symbols - Not Same Class Symbols"

Example 2

This example shows the addition of classed symbols from the same class.

Sub Main

 

Dim SurferApp As Object

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

SurferApp.Visible = True

 

Dim Doc As Object

Set Doc = SurferApp.Documents.Add

 

Set Map2 = Doc.Shapes.AddVectorBaseMap(SurferApp.Path+"\samples\FL2018.shp")

Set CSymbolsLayer = Map2.Overlays(1)

CSymbolsLayer.Name = "Classed Symbols - Same Class Symbols"

 

CSymbolsLayer.ApplySymbologyClassedSymbols(AttributeField:="MF_55-59yr", _

ShowMissingValues:=False, _

ClassMethod:=srfSymStDev, _

Count:=5, _

ShowAllOthers:=True, _

SameClassSymbols:=True, _

SymbolIndex:=12, _

MinimumSize:=0.15, _

MaximumSize:=0.65, _

ScalingMethod:=srfSymScalingSquareRoot, _

FillColorMethod:=srfSymSColorColormap, _

LineColorMethod:=srfSymSColorFixed, _

LineColor:=srfColorBlack)

 

CSymbolsLayer.SymbologyColormap(Type:=srfSymCMCSymbolFill).LoadPreset("Rainbow2")

 

Map2.Top = 10.5

Map2.Left = 6

Map2.Axes(1).Title = "Classed Symbols - Same Class Symbols"

Example 3

This example shows the addition of a legend with classed symbols.

Sub Main

 

Dim SurferApp As Object

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

SurferApp.Visible = True

 

Dim Doc As Object

Set Doc = SurferApp.Documents.Add

 

Set Legend1 = Doc.AddLegend

Legend1.LayerLayout = srfLegendLayerHorizontal

Legend1.LegendLayers.SetPosition(1, srfLegendLayerPosDownRight)

Legend1.ShowLayerName = True

Legend1.LayerSpacing = 0.25

Legend1.LayerNameFont.Underline = True

Legend1.SampleFormat.Type = srfLabFixed

Legend1.SampleFormat.NumDigits = 0

 

Set LegendLayerSame = Legend1.LegendLayers.Item(1)

LegendLayerSame.SampleSpacing = 0.2

Set LegendLayerIndividual = Legend1.LegendLayers.Item(2)

LegendLayerIndividual.SampleSpacing = 0.5

 

Legend1.Left = (Map1.Left+(Map2.Left+Map2.Width))/2 - (Legend1.Width/2)

SurferApp.ActiveWindow.Zoom(srfZoomFitToWindow)

 

End Sub