mdlIObject SetSourceFile

Specifies a new location and file to which the current Data or Definition information will be saved to.

Syntax

mdlIObject_Handle SetSourceFile type, filename

Application

MotionView Tcl Modify

Description

This command specifies a new location and file to which the current Data or Definition information will be saved to.

Inputs

type
The type of source file requested. Valid arguments are: DATA and DEFINITION.
filename
Upon the next save, the Definition file will be saved to the filename specified.

Example

To get the source file of a given assembly:
Note: You need to load an assembly prior to running this example.
hwi OpenStack
hwi GetSessionHandle mySessionName 
mySessionName GetProjectHandle myProjectName 
set activePageNum [myProjectName GetActivePage]
myProjectName GetPageHandle myPageName $activePageNum
set activeWinNum [myPageName GetActiveWindow]
myPageName GetWindowHandle myWindowName $activeWinNum
myWindowName GetClientHandle myClientName 
myClientName GetModelHandle myModelName 
myModelName GetChildHandle myAssembly assem_0
myAssembly SetSourceFile DEFINITION "C:/temp/def_file.mdl";
myAssembly ReleaseHandle;
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
hwi CloseStack

Errors

Returns 0 if successful, otherwise an error code.