/*
This example demonstrates how to use the XSIFileService object's
import and export methods
*/
NewScene( null, false );
var oFileService = new ActiveXObject( "XSI.XSIFileService" );
var mdl = Application.ActiveSceneRoot;
// Export scene root
var output = Application.InstallationPath( siUserPath ) + "\\MyModel.xsi";
oFileService.ExportDotXSI( mdl, output );
// Import the exported root into new scene
NewScene( null, false );
mdl = Application.ActiveSceneRoot;
var input = Application.InstallationPath( siUserPath ) + "\\MyModel.xsi";
oFileService.ImportDotXSI( input, mdl );
// Expected results:
//INFO : 4004 - Begin: Export .xsi file
//INFO : 4005 - End: Export .xsi file
//INFO : 4002 - Begin: Import .xsi file
//INFO : 4003 - End: Import .xsi file |