## Delta.AddAction

### Description

Adds the specified ActionDelta to the Delta.
Note: Only one ActionDelta for each type is permitted on the Delta. If you try to add an ActionDelta type that already exists, it returns an error with the message "//ERROR : 'siModificationDelta' is undefined".

### C# Syntax

    ActionDelta Delta.AddAction( siModificationDeltaType in_Type );

### Scripting Syntax

    oReturn = Delta.AddAction( DeltaType );

### Return Value

ActionDelta

### Parameters

Parameter | Type | Description
--- | --- | ---
DeltaType | siModificationDeltaType | The modification type to add

### Examples

#### JScript Example

    /*

    	This example demonstrates how to add an ActionDelta to a Delta.

    */

    NewScene(null, false);

    // Create a reference model from a cube

    var oRoot = Application.ActiveProject.ActiveScene.Root;

    var oCube = oRoot.AddGeometry("Cube", "MeshSurface");

    var emdlFileRefModel = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Models", "MyModel.emdl");

    CreateModelAndConvertToRef(oCube, emdlFileRefModel );

    // Add the Delta object

    var oDelta = AddDelta(oCube.Model);

    // Add an action of type siModificationDeltaStaticValue

    var oDeltaAction = oDelta.AddAction(siModificationDeltaStaticValue)

    // Add the Static value item

    var oActionDeltaItem = oDeltaAction.AddStaticValueItem(oCube + ".kine.global.posx", 10);

    // To apply the modification

    oDelta.Apply();

    // Add an action of type siModificationDeltaStaticValue

    // This one is not added since there is already an other ActionDelta of

    // type siModificationDeltaStaticValue

    var oDeltaAction = oDelta.AddAction(siModificationDeltaStaticValue)

### See Also

Delta.ActionDeltas