Description
Opens a scene from a file. A scene file (.scn) is required to execute this command.
This command is accessed from the main menu under File->Open
Scripting Syntax
OpenScene( [SceneFileName], [Confirm], [ApplyAuxiliaryData] )
Parameters
|
Parameter |
Type |
Description |
|
SceneFileName |
Full path name of the scene Default Value: A file browser pops up |
|
|
Confirm [public] |
True to prompt user to save the scene if the scene contains unsaved changes Default Value: True |
|
|
ApplyAuxiliaryData |
True to apply previously loaded auxiliary data once the scene is opened. You can use the '-auxiliary_data' command line argument when starting XSI to open an Auxiliary Data file. Please note that Auxiliary Data is applied prior to siOnEndSceneOpen events. Please refer to About Auxiliary Files for more details concerning the Auxiliary Data file format and usage. Default Value: False |
Examples
VBScript Example
'--------------------------------------------------------- ' VBScript example : Opening scenes. This script demonstrates ' how to open scenes. Note: this script destroys the current ' scene in XSI without warning. '--------------------------------------------------------- ' First clear the current scene. NewScene , False ' Now find a scene to open. SceneFile = Application.InstallationPath( siFactoryPath ) & "\Data\XSI_SAMPLES\Scenes\Simulation_Fluid_TapWater.scn" OpenScene SceneFile, False ' Now open it again, except apply auxiliary data. OpenScene SceneFile, False, True '--------------------------------------------------------- ' Output from this script: 'INFO : "4034 - Loaded scene was created with build number: <build> - compatibility version: 203" 'INFO : "4034 - Loaded scene was created with build number: <build> - compatibility version: 203" '---------------------------------------------------------
See Also
SOFTIMAGE|XSI v6.01