This document is archived and information here might be outdated.  Recommended version.


IColorRamp.CreateRamp Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Display)  

IColorRamp.CreateRamp Method

Generates a color ramp with length determined by Size value.

[Visual Basic .NET]
Public Sub CreateRamp ( _
    ByRef ok As Boolean _
)
[C#]
public void CreateRamp (
    ref bool ok
);
[C++]
HRESULT CreateRamp(
  VARIANT_BOOL* ok
);
[C++]

Parameters ok [out] ok is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

CreateRamp generates the number of colors in a color ramp as specified in the Size property.  The boolean pOK is a mask, i.e., you supply the boolean object and the method will set its value.  Generally speaking pOK will only return false if a property is missing.

Remarks

Use the CreateRamp after you have set the other properties like Size and the colors specific paramters.

See Also

IColorRamp Interface | IMultiPartColorRamp Interface | IColorRamp.Color Property | IColorRamp.CreateRamp Method | IRandomColorRamp Interface | IColorRamp Interface | IPresetColorRamp Interface | IAlgorithmicColorRamp Interface

.NET Samples

Create a custom default raster catalog renderer (Code Files: CustomRasterCatalogRenderer_VBNET) | Retrieve a color ramp from the SymbologyControl (Code Files: SymbolForm)

.NET Related Topics

Defining a renderer for a layer | How to create a raster classify renderer | How to create a raster unique value renderer | How to make different types of colors and color ramps