ImportDotXSI

Description

Imports a dotXSI file into the current scene. This import file must be in dotXSI format, and have .xsi as a file extension.

This command is accessed through the main menu, under File->Import->dotXSI. This command is equivalent to the SIImportDotXSIFile command, except that it prompts the user for import options, and requires confirmation.

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

Scripting Syntax

    ImportDotXSI( [FileName], [Parent] )

Parameters

Parameter | Type | Description
FileName | String | Name of the file to import Default Value: A file browser will prompt for a file if no filename is provided.
Parent | String | Object or model to use as the parent of the imported .xsi

Examples

VBScript Example

    '---------------------------------------------------------
    ' VBScript example : Importing and exporting a dotXSI file.
    '---------------------------------------------------------
    ' Create a model, with some primitives.
    dim ExportRoot
    SICreateModel , "ExportRoot", , ExportRoot
    CreatePrim "Torus", "MeshSurface", "Torus", ExportRoot
    CreatePrim "Cube", "NurbsSurface", "Cube", ExportRoot

    ' Now specify to export the model to a dotXSI file
    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 : "4002 - Begin: Import .xsi file"
    'INFO : "4003 - End: Import .xsi file"
    ' Object: ExportRoot.Torus
    ' Object: ExportRoot.Cube
    '---------------------------------------------------------

See Also

SIImportDotXSIFile | ExportDotXSI | SIExportDotXSIFile | ImportModel
XSIFileService |  |  |

Autodesk Softimage v7.5