mdlIModelClient CreateModel

Creates a model using the file specified.

Syntax

mdlIModelClient_Handle mdlIModelClient_Handle Filename, Type

Application

MotionView Tcl Modify

Description

This command creates a model using the file specified.

Inputs

Filename
The name of the file using the model which is to be created.
Type
The type of the file to be used to create the model:
mdl
for MDL files
pdf
for PDF files
adm
for ADAMS files

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 ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;
hwi CloseStack;

Errors

Returns 0 if the model is created, otherwise an error code.