## SetImageSource

### Introduced

v1.0

### Description

Sets the image source for an image clip or a list of image clips. At least one ImageClip and an image source file are required for this command.
This command is available under the property page of an ImageClip, in the Source group, in the filename field.

### Scripting Syntax

    SetImageSource( [Source], [InputObjs] );

### Parameters

Parameter | Type | Description
--- | --- | ---
Source | String | Source to set
InputObjs | String | List of clips to set the source

### Examples

#### VBScript Example

    '---------------------------------------------------------
    ' VBScript example : Setting image clip sources. This script
    ' demonstrates the use of SetImageSource to set the source
    ' image for image clips.
    '---------------------------------------------------------
    ' Get the filenames of some image sources.
    Dim XSIsrc, Teethsrc, Jiosrc
    Source1 = Application.InstallationPath( siFactoryPath ) & "\Data\XSI_SAMPLES\Pictures\xsilogo.jpg"
    Source2 = Application.InstallationPath( siFactoryPath ) & "\Data\XSI_SAMPLES\Pictures\top_teeth.jpg"
    Source3 = Application.InstallationPath( siFactoryPath ) & "\Data\XSI_SAMPLES\Pictures\jio.jpg"
    ' Now create some image clips with the images assigned.
    Dim XSIClip, TeethClip, JioClip
    SICreateImageClip Source1, "XSI", XSIClip
    SICreateImageClip Source2, "Teeth", TeethClip
    SICreateImageClip Source3, "Jio", JioClip
    logmessage "Image clip " & XSIClip & " created with source " & Source1
    logmessage "Image clip " & TeethClip & " created with source " & Source2
    logmessage "Image clip " & JioClip & " created with source " & Source3
    ' If the image clips are inspected at this point, notice that each clip
    ' has a source image related to its name. (i.e Clips.XSI source = xsilogo.jpg).
    ' Now we can change the image sources, so that they are associated with different clips
    SetImageSource "Sources.xsilogo_jpg", JioClip
    SetImageSource "Sources.jio_jpg", TeethClip & "," & XSIClip
    '---------------------------------------------------------
    ' Output from this script:
    'INFO : "Image clip Clips.XSI created with source <FatoryPath>\Data\XSI_SAMPLES\Pictures\xsilogo.jpg"
    'INFO : "Image clip Clips.Teeth created with source <FatoryPath>\XSI_SAMPLES\Pictures\top_teeth.jpg"
    'INFO : "Image clip Clips.Jio created with source <FatoryPath>\Data\XSI_SAMPLES\Pictures\jio.jpg"
    '---------------------------------------------------------

### See Also

AddImageSource SICreateImageClip