## ActionSource.Offload

### Introduced

v4.0

### Description

Offloads the action source on disk. The source storage must be set to external and the file must be valid. The source is saved and all current AnimationSourceItems are removed. All Clips that use the source are notified and are disconnected (the clip's color will turn gray) and the source icon in the explorer changes.
Note: Offloading is only available for animation and not for shape or audio.

### C# Syntax

    ActionSource.Offload();

### Scripting Syntax

    ActionSource.Offload();

### Examples

#### VBScript Example

    '
    '       This example illustrates how to use the Offload method on an ActionSource
    '
    NewScene , false
    set oRoot = Application.ActiveProject.ActiveScene.Root
    ' These commands were cut-and-pasted from scripting history and modified to work in a
    ' script. They create a simple actionsource from animation on the null's position
    set oNull = oRoot.AddNull
    strPosParams = oNull & ".kine.local.posx," & oNull & ".kine.local.posy," & oNull & ".kine.local.posz"
    Translate oNull, -8.153, 7.015, -0.702, siRelative, siView, siObj, siXYZ
    SaveKey strPosParams, 1.000
    Translate oNull, 8.350, -8.935, 0.894, siRelative, siView, siObj, siXYZ
    SaveKey strPosParams, 50.000
    Translate oNull, 9.413, 8.935, -0.894, siRelative, siView, siObj, siXYZ
    SaveKey strPosParams, 100.000
    ' Create a new model so that we can have another null called "null"
    set oModel = oRoot.AddModel(,"Model")
    ' Create a new ActionSource
    set oActionSource = oModel.AddActionSource("MyActionSource")
    ' Use the fcurves on the null object to create the actionsource items
    set oPosx = oNull.Posx
    set oPosy = oNull.Posy
    set oPosz = oNull.Posz
    oActionSource.AddSourceItem oPosx.FullName, oPosx.Source
    oActionSource.AddSourceItem oPosy.FullName, oPosy.Source
    oActionSource.AddSourceItem oPosz.FullName, oPosz.Source
    ' Create a new null
    set oNull2 = oModel.AddNull( "null" )
    ' Set the action storage to external (text)
    SetValue oActionSource & ".storage", 2
    ' Add a clip for the source
    AddClip "Model", "Sources.Animation.Model.MyActionSource", , , 16, , , , false
    ' Offload the sources
    oActionSource.Offload