NewScene( null, false );
// ---------------------------------------------------------------------------
// SETUP
//
// First import a model so we have some external files to find
var FPath = XSIUtils.BuildPath(
Application.InstallationPath( siFactoryPath ),
"Data", "XSI_SAMPLES", "Models", "Man_Face.emdl"
);
ImportModel( FPath, null, true );
// ---------------------------------------------------------------------------
// USING THE FileReference OBJECT
//
// Get the collection of all external files on the scene
var oScene = Application.ActiveProject.ActiveScene;
var l_extFileList = oScene.ExternalFiles;
// Get the first file object in the list
var oFile = l_extFileList(0);
if ( l_extFileList.NumberOfFilesInSequence > 1 ) {
// Show the last file in the sequence
Application.LogMessage( oFile.GetFileInSequence(oFile.NumberOfFilesInSequence-1) );
}
// Expected results:
//INFO : <factory_path>\rsrc\noIcon3.pic |