LoadPreset

LoadPreset loads the specified preset color spectrum file.

Syntax

object.LoadPreset(PresetName )

Parameter

Type

Required/

Optional

Default

Description

PresetName

String

Required

This is the name of the preset color spectrum file.

Example 1

This example demonstrates how to load a preset color map file. Refer to the script on the ColorMap Object page.

ColorMap.LoadPreset ("Blues3")

Example 2

This example demonstrates how to create a contour map from the demogrid.grd sample file and load the "Rainbow" and "Terrain" preset color spectrum files.

Dim MapFrame As Object

Set MapFrame = Plot.Shapes.AddContourMap(SurferApp.Path+"\Samples\demogrid.grd")

Dim ContourLayer As Object

Set ContourLayer = MapFrame.Overlays(1)

ContourLayer.FillContours = True

ContourLayer.FillForegroundColorMap.LoadPreset ("Rainbow")

ContourLayer.FillBackgroundColorMap.LoadPreset ("Terrain")

Used by: ColorMap object