//
// This example demonstrates how to set the current project with jscript
//
// Backup the current project
var sOriginalProjectPath = Application.ActiveProject2.Path
Application.LogMessage( "Original Active Project: " + sOriginalProjectPath );
// Set the active project to be XSI_Samples
var sPath = XSIUtils.BuildPath(
Application.InstallationPath(siFactoryPath),
"Data", "NewProject"
);
Application.ActiveProject2 = Application.CreateProject(sPath);
Application.LogMessage ( "New Active Project: " + Application.ActiveProject2.Path );
// Set back the original project
Application.ActiveProject2 = Application.CreateProject( sOriginalProjectPath );
Application.LogMessage ( "New Active Project: " + Application.ActiveProject2.Path );// INFO : Original Active Project: C:\Program Files\Autodesk\Softimage 2011 289 ship/Data/NewProject
// INFO : Original Active Project: C:\Program Files\Autodesk\Softimage 2011 289 ship/Data/NewProject
// INFO : New Active Project: C:\Program Files\Autodesk\Softimage 2011 289 ship/Data/NewProject
// INFO : New Active Project: C:\Program Files\Autodesk\Softimage 2011 289 ship/Data/NewProject |