mdlIModel ExportAs

Exports a model into a data only, wizard only, or a data and wizard file.

Syntax

mdlIModel_handle ExportAsoutfile_path. export_option

Application

MotionView Tcl Modify

Description

This command is used to export a model. The different ‘export_option’ arguments enable you to export just the data or wizard selections, or both, to a selected file.

Inputs

outfile_path
The full file name where wizard selections, or data, or both are to be exported.
export_option
The model can be exported in three formats based on the option specified. Specify one of the options listed below:
DATA_ONLY
WIZARD_SELECTIONS_ONLY
DATA_AND_WIZARD_SELECTIONS

Example

To export a model as a data only file:
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
win1 GetClientHandle mcl
mcl GetModelHandle modl
modl  ExportAs "C:/temp/data_only.mdl" "DATA_ONLY";
modl ReleaseHandle
mcl ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;

Errors

Returns 0 if successful. If there is an error, an error code will be returned.