Exports a model to an .emdl file.
This command is accessed from the main menu in
File->Export->Model.
ExportModel( Model, FileName, IncludeSubModels, CopyExtFiles ); |
Parameter | Type | Description |
---|---|---|
Model | String | Model to be exported.
Default Value: Selected model |
FileName | String | Name of the file to export to |
IncludeSubModels | Boolean | True to include submodels
Default Value: True |
CopyExtFiles | Boolean | Copy external files related to this mdoel to the project. Note
that the destination must be valid Softimage Project, else the
files will not be copied.
Default Value: True |
'--------------------------------------------------------- ' VBScript example : Importing and exporting models using ' the ImportModel/ExportModel commands. Models and submodels ' are created and then exported and imported in this example. '--------------------------------------------------------- ' First create a model, a submodel, and primitives within them. SICreateModel , "SubModel" SICreateModel "SubModel", "Model" CreatePrim "Torus", "MeshSurface", "MyTorus", "SubModel" CreatePrim "Cube", "MeshSurface", "MyCube", "Model" ' Now export the models, once exporting submodels, and once not. emdlFile = Application.InstallationPath( siUserPath ) & "\Model.emdl" emdlSubFile = Application.InstallationPath( siUserPath ) & "\Model_with_Submodels.emdl" ExportModel "Model", emdlFile, False ExportModel "Model", emdlSubFile, True ' Now delete the models/primitives of the scene (so we can re-import them), DeleteObj "Model.SubModel.MyTorus" DeleteObj "Model.SubModel" DeleteObj "Model.MyCube" DeleteObj "Model" ' Now import the exported files. One as a referenced model, the other not. ImportModel emdlFile, , False, , "Model (no submodels, not referenced)" ImportModel emdlSubFile, , True, , "Model (with submodels, referenced)" '--------------------------------------------------------- 'INFO : Output from this script: 'INFO : "4152 - Data loaded from file <UserPath>\Model.emdl was created with build number: <build_num> - compatibility version: 300" 'INFO : "4152 - Data loaded from file <UserPath>\Model_with_Submodels.emdl was created with build number: <build_num> - compatibility version: 300" 'INFO : Object: "Model___no_submodels__not_referenced_.MyCube" 'INFO : Object: "Model___with_submodels__referenced_.MyCube" 'INFO : Object: "Model___with_submodels__referenced_.SubModel.MyTorus" '--------------------------------------------------------- |