mdlIModelClient ExportModel

Exports the model to the file name specified.

Syntax

mdlIModelClient_Handle ExportModelFilename

Application

MotionView Tcl Modify

Description

This command exports the model to the file name specified.

Inputs

Filename
The name of the file to which the model is to be exported. The filename argument does not require the extension of the model to be exported. If the solver mode is set to MotionSolve or MSLINEAR, the model is saved to that exact file name. Any files existing with that same file name are overwritten.

Example

Copy the file slider_crank.mdl into the present working directory.

The present working directory can be identified by using the pwd command in the command window.
hwi OpenStack
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
win1 GetClientHandle mcl
mcl CreateModel "slider_crank.mdl" mdl
mcl ExportModel slider_crank_export
mcl ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;
hwi CloseStack;

Errors

Returns success (0) or an error code.