ExportDotXSI

Categories

file

Description

Exports an object to a dotXSI file.

This command is accessed through the main menu by selecting File->Export->dotXSI. This command is equivalent to the SIExportDotXSIFile command, except that it inspects the dotXSI export options and requires user confirmation.

Note: Because this command requires user interaction, it is not suitable for use in batch scripts. Use the equivalent OM method instead: XSIFileService.ExportDotXSI.

Scripting Syntax

ExportDotXSI( Model, [FileName] );

Parameters

Parameter Type Description
Model String Model to be exported

Default Value: Selected model

FileName String Name of the file to export to

Examples

JScript Example

/*
        ---------------------------------------------------------
          Demonstrates how to import and export a dotXSI file.
        ---------------------------------------------------------
*/
NewScene( null, false );
// Create a model, with some primitives.
var ExportRoot = SICreateModel( null , "ExportRoot" )(0);
CreatePrim( "Torus", "MeshSurface", "Torus", ExportRoot );
CreatePrim( "Cube", "NurbsSurface", "Cube", ExportRoot );
// Now specify to export the model to a dotXSI file
var dotXSIFile = Application.InstallationPath( siUserPath ) + "\\MyModel.xsi";
ExportDotXSI( "ExportRoot", dotXSIFile );
// Now delete the primitives and model, and re-import them.
DeleteObj( "ExportRoot.Torus" );
DeleteObj( "ExportRoot.Cube" );
DeleteObj( "ExportRoot" );
// Now import the same model that was just exported.
ImportDotXSI( dotXSIFile );
//---------------------------------------------------------
// Output from this script (user specifies ok on both dialogs):
//INFO : 4004 - Begin: Export .xsi file
//INFO : 4005 - End: Export .xsi file
//INFO : 0360
//INFO : 4002 - Begin: Import .xsi file
//INFO : 4003 - End: Import .xsi file
//---------------------------------------------------------

See Also

SIExportDotXSIFile ImportDotXSI SIImportDotXSIFile ExportModel XSIFileService