XSIFileService.ExportDotXSI

Introduced

v1.0

Description

Exports content from the current Scene to a dotXSI (.xsi) file. This method is safe to use in batch because it does not prompt the user for a location or for dotXSI Export settings. The current dotXSI Export options are used with this method. To allow the user to change these settings, use the ExportDotXSI command instead.

Scripting Syntax

XSIFileService.ExportDotXSI( Model, [FileName] );

Parameters

Parameter Type Description
Model String Model to be exported
FileName String Name of the file to export to

Examples

JScript Example

/*
        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

See Also

ExportDotXSI SIExportDotXSIFile XSIFileService.ImportDotXSI