## XSIFileService.ImportDotXSI

### Introduced

v1.0

### Description

Imports 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 import settings. The current dotXSI Import options are used with this method. To allow the user to change these settings, use the ImportDotXSI command instead.

### Scripting Syntax

    XSIFileService.ImportDotXSI( FileName, Parent );

### Parameters

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

### Examples

#### VBScript Example

    '

    ' This example demonstrates how to use the XSIFileService object's

    ' import and export methods

    '

    dim oFileService, mdl, output, input

    NewScene , false

    set oFileService = CreateObject( "XSI.XSIFileService" )

    set mdl = Application.ActiveSceneRoot

    ' Export scene root

    output = Application.InstallationPath( siUserPath ) & "\MyModel.xsi"

    oFileService.ExportDotXSI mdl, output

    ' Import the exported root into new scene

    NewScene , false

    set mdl = Application.ActiveSceneRoot

    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

ImportDotXSI SIImportDotXSIFile XSIFileService.ExportDotXSI