Scene dependencies example
This script reads a scene and copies all its dependencies to another location
Example
// This script reads a scene and copies all its dependencies to another location var mxsPath = "C:\scene.mxs"; Maxwell.openMxs( mxsPath ); var nDeps = Scene.getSceneDependenciesCount(); var deps = Scene.getSceneDependencies(); var i; var targetFolder = "C:\input" for( i = 0; i < nDeps; i++ ) { var currentDep = deps[i]; var target = targetFolder + "\" + FileManager.getFileNameAndExtension( currentDep ); Maxwell.print( "Copying dependency: " + currentDep ); var ok = FileManager.copy( currentDep, target ); if( ok == 0 ) { Maxwell.print( "Error copying dependency" ); } } //////////////////////////////////////////////////////////////////////////////////////////////////////////