Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Example
Code Block
langjavascript

// 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" );
   }
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////