If you have a Surfer script that defines an object fill color that is not applied, there are a few possible causes and solutions for this behavior.
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.Opacity= 75 Polygon.Fill.ForeColorRGBA.Color = srfColorOrange
Reason 2: Fill the Contours
If you are setting the fill color of a contour map, be sure to set FillContours to True before setting the fill colors:
ContourLayer.FillContours = True ContourLayer.FillForegroundColorMap.LoadPreset("Rainbow")
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.FillForegroundColorMap.LoadPreset("Rainbow5")
ContourLayer.ApplyFillToLevels(FirstIndex:=1, NumberToSet:=1, NumberToSkip:=0)
If the above solutions do 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 surfersupport@goldensoftware.com.
Updated November 2021
Comments
Please sign in to leave a comment.