## FCurveKeyCollection.GetMaxKeyValue

### Introduced

v6.0

### Description

Returns the largest key value for the fcurve key collection. The type of value that is returned depends on the type of fcurve used as follows:
Standard and raw fcurves return a double value (VT_R8)
Integer fcurves return a LONG (VT_I4)
Boolean fcurves return a variant bool value (VT_BOOL,VARIANT_TRUE,VARIANT_FALSE)

### C# Syntax

    Object FCurveKeyCollection.GetMaxKeyValue();

### Scripting Syntax

    oVariant = FCurveKeyCollection.GetMaxKeyValue();

### Return Value

Variant

### Examples

#### JScript Example

    //

    // This example illustrates how to get the largest key value for an fcurvekey collection.

    // Create a new scene

    NewScene(null, false);

    // Create a null

    oNull = Application.GetPrim("Null");

    // Get the posx parameter of the null

    oPosX = oNull.posx

    // Create array of time-value pairs

    aKeys = new Array( 0.00, 5.00,

    				1.00, 6.00,

    				2.00, 7.00,

    				3.00, 8.00,

    			 	4.00, 9.00,

    				5.00, 10.00 );

    // Create an empty FCurve

    oFCurve = oPosX.AddFCurve2( null, siStandardFCurve );

    // Set the fcurve keys

    oFCurve.SetKeys( aKeys );

    Application.LogMessage( 'Largest key value: ' + oFCurve.GetKeysBetween(2,4).GetMaxKeyValue(), siInfo );

    // Produces the following output:

    //

    //INFO : Largest key value: 9

### See Also

FCurveKeyCollection.GetMinKeyValue FCurveKeyCollection.GetMidKeyValue FCurve.GetMaxKeyValue