I set the fill color of an object from a Surfer script, but nothing happens

This article goes over a few possible causes and solutions as to why fill may not be applied when setting the fill color of an object in a Surfer script.

Reason 1: A Fill Pattern is Necessary

Besides setting the ForeColorRGBA property, it may also be necessary to set the object's fill pattern, such as:

Polygon.Fill.Pattern = "Diagonal Cross"
Polygon.Fill.Transparent = True
Polygon.Fill.ForeColorRGBA.Color = srfColorOrange


Reason 2: Fill the Contours

If you are setting the fill color of a contour map, be sure you set FillContours to True before setting the fill colors:

ContourLayer.FillContours = True


Reason 3: Apply the Fill to the Contours

After changing the colormap for a contour layer (e.g. loading a CLR file or specifying a preset), you need to apply the fill changes.

ContourLayer.ApplyFillToLevels(FirstIndex:=1, NumberToSet:=1, NumberToSkip:=0)


If that does not help, please email a small sample script that can be run in Scripter that shows the problem, and a description of what you are trying to do, to


Updated November 12, 2018

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.