## SIImportDotXSIFile

### Description

Imports a dotXSI file. The import file must be in dotXSI format, and have .xsi as a file extension.
This command is accessed through the main menu by selecting File->Export->dotXSI, then by selecting the desired import options and pressing Ok. This command is equivalent to the ImportDotXSI command, except that the user is not prompted for import options.
This command supports the downloading of files off the internet. If the filename specified is a URL then the file will be downloaded locally before the command is executed.

### Scripting Syntax

    SIImportDotXSIFile( FileName, [Parent] );

### Parameters

Parameter | Type | Description
--- | --- | ---
FileName | String | Name of the dotXSI file to import.
Parent | String | Object or model to use as the parent

### Examples

#### VBScript Example

    '---------------------------------------------------------
    ' VBScript example : Importing and exporting a dotXSI file.
    ' This example uses the SIImportDotXSIFile and SIExportDotXSIFile
    ' commands, which do not prompt for the user for validation of
    ' import/export parameters like ImportDotXSI and ExportDotXSI.
    '---------------------------------------------------------
    ' Create a model, with some primitives.
    dim ExportRoot
    SICreateModel , "ExportRoot", , ExportRoot
    CreatePrim "Torus", "MeshSurface", "Torus", ExportRoot
    CreatePrim "Cube", "NurbsSurface", "Cube", ExportRoot
    ' Since we are not getting a dialog to modify dotXSIExport options,
    ' We can specify them here, if we wish. To see what each parameter corresponds to,
    ' goto the .spdl file, <InstallationPath>\Application\spdl\C3DdotXSIExportOpt.spdl.
    SetValue "dotXSIExportOptions.project_name", ActiveProject.Name
    SetValue "dotXSIExportOptions.output_file_format", 1 ' 0 = Binary, 1 = Ascii
    SetValue "dotXSIExportOptions.output_file_format_version", 360 ' "3.0" = 300, "3.5" = 350, "3.6" = 360
    SetValue "dotXSIExportOptions.sceneroot", False
    SetValue "dotXSIExportOptions.polymesh", True
    SetValue "dotXSIExportOptions.tesselation", False
    SetValue "dotXSIExportOptions.nrbssrf", True
    SetValue "dotXSIExportOptions.nrbscrv", True
    SetValue "dotXSIExportOptions.animall", True
    SetValue "dotXSIExportOptions.constraint", True
    SetValue "dotXSIExportOptions.custompset", True
    ' Now specify to export the model to a dotXSI file
    dotXSIFile = Application.InstallationPath( siUserPath ) & "\MyModel.xsi"
    SIExportDotXSIFile ExportRoot, dotXSIFile
    ' Now delete the primitives and model, and re-import them.
    DeleteObj "ExportRoot.Torus"
    DeleteObj "ExportRoot.Cube"
    DeleteObj "ExportRoot"
    ' Again, since we do not get a dialog box to change import options, change them
    ' now programmatically. To see what each parameter corresponds to, goto the
    ' .spdl file, <InstallationPath>\Application\spdl\C3DdotXSIImportOpt.spdl.
    SetValue "dotXSIImportOptions.anim_import", True
    SetValue "dotXSIImportOptions.classical_scaling", True
    SetValue "dotXSIImportOptions.mat_import", True
    SetValue "dotXSIImportOptions.txt_import", True
    ' Now import the same model that was just exported.
    SIImportDotXSIFile dotXSIFile
    '---------------------------------------------------------
    ' Output from this script (user specifies ok on both dialogs):
    'INFO : "4004 - Begin: Export .xsi file"
    'INFO : "4005 - End: Export .xsi file"
    'INFO : "4002 - Begin: Import .xsi file"
    'INFO : "4003 - End: Import .xsi file"
    ' Object: ExportRoot.Torus
    ' Object: ExportRoot.Cube
    '---------------------------------------------------------

### See Also

ImportDotXSI ExportDotXSI ImportModel SIExportDotXSIFile