MarkerFormat Object

The MarkerFormat object contains the properties of symbols.

The following table provides all properties of the MarkerFormat object.

Property

Description

Application

Returns the application object. It is a read only property.

FillColor

Returns/sets the fill color as an RGB value. The FillColor property is superseded by FillColorRGBA property. FillColor has been preserved for backwards compatibility.

FillColorRGBA

Returns the fill RGBA color object. It is a read only property.

Index

Returns/sets the glyph index.

LineColor

Returns/sets the line color as an RGB value. The LineColor property is superseded by LineColorRGBA property. LineColor has been preserved for backwards compatibility.

LineColorRGBA

Returns the line RGBA color object. It is a read only property.

Parent

Returns the parent object. It is a read only property.

Set

Returns/sets the symbol set name.

Size

Returns/sets the symbol height in page units.

Example 1

Sub Main

 

Dim SurferApp As Object

Set SurferApp = CreateObject("Surfer.Application")

SurferApp.Visible = True

 

Dim Plot As Object

' Dim SurferApp As Object

Set SurferApp = CreateObject("Surfer.Application")

SurferApp.Visible = True

 

'Dim Plot As Object

Set Plot = SurferApp.Documents.Add

 

Set MapFrame2 = Plot.Shapes.AddPostMap(SurferApp.Path + "\Samples\demogrid.dat")

 

Dim PostMap2 As Object

Set PostMap2 = MapFrame2.Overlays(1)

PostMap2.Name = "Sample"

PostMap2.Symbol.LineColorRGBA.Color = srfColorBlue

PostMap2.Symbol.FillColorRGBA.Color = srfColorRed

PostMap2.Symbol.Index =12

 

End Sub

Example 2

The following script demonstrates how the MarkerFormat object is used in reference to the Variogram object.

Sub Main

 

'Declares SurferApp as an object

Dim SurferApp As Object

 

'Creates an instance of the Surfer Application object and assigns it

'to the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")

 

'Makes Surfer visible

SurferApp.Visible = True

 

'Declares Plot as an object

Dim Plot As Object

 

'Creates a plot document in Surfer and assigns it to the variable

'named "Plot"

Set Plot = SurferApp.Documents.Add(srfDocPlot)

 

'Declares Shapes as an object

Dim Shapes As Object

 

'Assigns the Shapes collection to the variable named "Shapes"

Set Shapes = Plot.Shapes

 

'Declares Variogram as an object

Dim Variogram As Object

 

'Creates a variogram and assigns it to the variable named "Variogram"

Set Variogram = Shapes.AddVariogram(SurferApp.Path+"\Samples\demogrid.dat")

 

'Declares MarkerFormat as an object

Dim MarkerFormat As Object

 

'Assigns the symbol properties of the variogram to the variable

'named "MarkerFormat"

Set MarkerFormat = Variogram.Symbol

 

End Sub

Example 3

The following script demonstrates how the MarkerFormat object is used in reference to the post map.

'Creates an instance of the Surfer Application object and assigns it

'to the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")

 

'Makes Surfer visible

SurferApp.Visible = True

 

'Declares Plot as an object

Dim Plot As Object

 

'Creates a plot document in Surfer and assigns it to the variable

' named "Plot"

Set Plot = SurferApp.Documents.Add

 

Set MapFrame2 = Plot.Shapes.AddPostMap(SurferApp.Path + "\samples\sample1.dat")

 

Dim PostMap2 As Object

 

Set PostMap2 = MapFrame2.Overlays(1)

 

PostMap2.Name = "Sample"

 

'Set the line color and fill color of the symbol individually

PostMap2.Symbol.LineColorRGBA.Color = srfColorBlue

PostMap2.Symbol.FillColorRGBA.Color = srfColorRed

 

'Set the symbol number. In this example symbol 12.

PostMap2.Symbol.Index =12